Seminar Report
Seminar Report
Seminar Report
INTRODUCTION
--------------------------------------------------------------------------------A command prompt is used in a text-based or "command-line" interface, such as a
UNIX terminal or a DOS shell. It is a symbol or series of characters at the beginning of a
line that indicates the system is ready to receive input. It other words, it prompts the user
for a command (hence the name).
Since a command prompt requires specific input, it is basically useless if you
don't know the syntax of the command you want to enter. Therefore, knowledge of some
basic commands is required to use a command-line interface. Fortunately, most operating
systems now use a graphical user interface GUI as their main way of requesting input
from the user. This means you don't have to learn any special commands in order to use
the computer. However, learning to use a command-line interface is kind of like learning
to drive a car with a manual transmission. You never know when it might come in handy.
To access the command prompt in Windows, in Windows 7, click the Start button
and enter cmd. In other versions, from the Start menu, select Run... and then enter cmd.
The command prompt is often preceded by the current directory of the system the user is
working with. For example, the default prompt in DOS may be C:\, which indicates the
user is working at the root level of the main C: drive.
Command Prompt is officially called Windows Command Processor but is also
sometimes called the command shell or by its file name cmd.exe. Command Prompt is
sometimes incorrectly referred to as "the DOS prompt" or as MS-DOS itself. Command
Prompt is a Windows program that emulates many of the command line abilities
available in MS-DOS but it is not actually MS-DOS. Command Prompt is most
commonly used to execute batch files, perform advanced administrative functions, and
troubleshoot and solve certain kinds of Windows issues.
1.3 Unix terminal :When you log into a UNIX computer, your shell begins to run and provides you
with a command prompt. The command prompt's appearance varies depending on the
shell you're using. In UNIX, the prompt may be ~ user$, where "user" is the name of the
current user. The tilde (~) indicates the current directory is the user's home folder.
Every user has a unique username. When they logon to the system, they are
placed in a HOME directory, which is a portion of the disk space reserved just for them.
When you log onto a UNIX system, your main interface to the system is called the UNIX
SHELL. This is the program that presents you with the dollar sign ($) prompt. This
prompt means that the shell is ready to accept your typed commands. There is more than
one variety of shell that can be used on a UNIX system. one of the most standard UNIX
shells called the Bourne Shell. Other shells such as the Korn Shell or Bourne Again Shell
work very similarly at this level. They all use the dollar sign as their prompt.
UNIX commands are strings of characters typed in at the keyboard. To run a
command, you just type it in at the keyboard and press the ENTER key. We will look at
several of the most common commands below. UNIX extends the power of commands by
using special flags or switches. These switches are one of the most powerful features of
UNIX commands. Switches are usually preceded with a dash (-) and precede any
filenames or other arguments on the command line.
2
1.4 Comparison between Windows and UNIX commands :There are many commands which are use for same task but have different syntax in
different operating systems. Their comparison is as follows:
In windows, the command for listing files directory is dir while in Unix,
command for same task is ls.
In windows, the command for clearing the screen is cls while in Unix, command
for same task is clear.
In windows, the command for copying a file is Copy while in Unix, command for
same task is cp.
In windows, the command for removing a file Del while in Unix, command for
same task is rm.
In windows, the command for moving a file Move while in Unix, command for
same task is mv.
Windows or DOS commands are not case sensitive, UNIX systems are case
sensitive (upper and lower case characters are considered different). Nearly all
command names and most of their command line switches will be in lowercase.
1.5 Difficulty :The main difficulty is, as all operating system such as Unix, windows has their
own commands. Therefore, the new user fined it difficult to work on these command
prompt or terminal.
To resolve this difficulty, new application is created called Multi-Platform based
Virtual terminal. In this terminal, the commands used are common for all platforms such
as windows, Unix, etc.
1.6 Multi-platform based Virtual Terminal :This terminal works as the virtual command prompt on multiple platforms. It is
platform independent. It recovers disadvantages of terminal. In this we create user define
commands. Same command can be execute on all platform. It also has a built in editor
which lets you write files.
It is written in Java, So, java must be installed in system i.e. machine has to be a
Java Virtual Machine (JVM).
1.6.1 Features of Virtual Terminal :3
1. It supports multiple entries of filenames & website names under a single command, all
these entries are then processed sequentially.
2. It also has a built in editor which lets you write files:
a) Type "edit" at the command-line.
b) Write whatever you want to write.
c) Type "save example" where, "example" is the name of the file you have
written.
d) Type "exit" at command-line to exit from the editor mode and go back to
command mode of Virtual Terminal"
e) To edit an existing file type "edit hello.txt" where, "hello.txt" is the existing file
you want to edit.
3. A directory cannot delete with files inside it. the files inside have to be deleted, then
delete the directory.
4. It supports "command-line surfing". Its just like as of "doskey" in DOS. You can
easily switch between your previous commands using the UP arrow & DOWN arrow
keys.
5. It supports multiple video modes (like orange text on black background etc.).
6. It can run any number of programs with a single 'command-line' command e.g. "run
calc write mplayer" will start the programs "calc", "write" & "mplayer" simultaneously.
7. It cannot access any other partition or drive directly from the command-line. If the
Terminal.class file is in your drive C:\, then only C drive can be accessed.
Chapter2
-----------------------------------------------------------------------------------------------------------Every project has its own methodology. Various methodology models such as
waterfall, incremental, prototyping, spiral etc. The model suitable for our project is
waterfall model.
2.1 Phases of Project :This section explains the various phases of the project. The software model
followed for implementing this project is waterfall model.
Requirements
Analysis
Design
Implementation
Testing
2.1.1 Requirements Phase :In this phase, all the requirements of the project will be gathered based on which
the problem will be analyzed. We will try to understand the specific requirements that
must be achieved to implement this project. At the end of this phase, we will have
5
Problem definition
Requirement Specification
2.1.1.1 Requirement specification :In the context of computer-based systems (and software), the term specification
means different things to different people, a specification can be written document, a
graphical model, a formal mathematical model, and a collection of usage of scenarios,
prototype or any combination of these. The System specification is the final work product
produced by the system and requirements engineer. It serves as the foundation for the
hardware engineering, software engineering, database engineering and human
engineering. It describes the function and performance of a computer-based system and
the constrained that will govern its development. The specification also describes the
information that is input to and output from the system.
2.1.1.2 Hardware requirements :These are the minimum requirements of the computer setup for the product
developed to run, giving satisfactory results. Any faster machine would certainly improve
the performance and speed.
1. Pentium III 700 MHz (2)
2. 64 MB Ram
3. 2 GB Hard Disk space.
2.1.1.3 Software requirements :These are the requirement for the well functioning of the software. any upgraded
versions of the software will also works.
1)
This phase analyzes the various aspects of the project. In this phase, the
architecture of the project will be designed and designed and decisions regarding problem
evaluation will be taken. The basic modules in which the project will be divided will be
taken. The technology decision for implementing the project is taken in this phase.
2.2 Design :In this phase, we will come out with various UML diagrams, which explain the
design of the project. The database designing will be done keeping in view the
performance issues. All the data structures and interfaces required would be designed as
per the specifications mentioned in Requirements phase.
2.3 Implementation :In this phase, we will decide the coding strategy that will be employed to
implements this Project. Based on the decided strategy, we will implement the project
using the technologies decided in analysis phase. The modules will be implemented as
per the design. The functionality of each unit will be tested during this phase.
2.4 Testing :In this phase, various testing strategies like Unit Testing, Integration Testing,
Validation Testing and system Testing will be carried out for various test cases. All the
modules will be tested for specific test and all the errors uncovered will be fixed.
Reliability: Java needed to reduce the likelihood of fatal errors from programmer
mistakes. With this in mind, object-oriented programming was introduced. Once
data and its manipulation were packaged together in one place, it increased Javas
robustness.
portable language.
2.5.3 Java is a Platform :Java (with a capital J) is a platform for application development. A platform is a
loosely defined computer industry buzzword that typically means some combination of
hardware and system software that will mostly run all the same software. For instance
PowerMacs running Mac OS 9.2 would be one platform. DEC Alphas running Windows
NT would be another. There's another problem with distributing executable programs
from web pages. Computer programs are very closely tied to the specific hardware and
operating system they run.
A Windows program will not run on a computer that only runs DOS. A Mac
application can't run on a Unix workstation. Java solves the problem of platformindependence by using byte code. The Java compiler does not produce native executable
code for a particular machine like a C compiler would. Instead it produces a special
8
format called byte code. Java byte code written in hexadecimal, byte by byte, looks like
this: CA FE BA BE 00 03 00 2D 00 3E 08 00 3B 08 00 01 08 00 20 08
This looks a lot like machine language, but unlike machine language Java byte
code is exactly the same on every platform. This byte code fragment means the same
thing on a Solaris workstation as it does on a Macintosh PowerBook. Java programs that
have been compiled into byte code still need an interpreter to execute them on any given
platform. The interpreter reads the byte code and translates it into the native language of
the host machine on the fly. The most common such interpreter is Sun's program java
(with a little j). Since the byte code is completely platform independent, only the
interpreter and a few native libraries need to be ported to get Java to run on a new
computer or operating system. The rest of the runtime environment including the
compiler and most of the class libraries are written in Java. All these pieces, the javac
compiler, the java interpreter, the Java programming language, and more are collectively
referred to as Java.
2.5.4 Java is Simple :Java was designed to make it much easier to write bug free code. According to
Sun's Bill Joy, shipping C code has, on average, one bug per 55 lines of code. The most
important part of helping programmers write bug-free code is keeping the language
simple. Java has the bare bones functionality needed to implement its rich feature set. It
does not add lots of syntactic sugar or unnecessary features. Despite its simplicity Java
has considerably more functionality than C, primarily because of the large class library.
Because Java is simple, it is easy to read and write. Obfuscated Java isn't nearly as
common as obfuscated C. There aren't a lot of special cases or tricks that will confuse
beginners. About half of the bugs in C and C++ programs are related to memory
allocation and deallocation.
2.5.5 Java is Platform Independent :Java was designed to not only be cross-platform in source form like C, but also in
compiled binary form. Since this is frankly impossible across processor architectures
Java is compiled to an intermediate form called byte-code. A Java program never really
executes natively on the host machine. Rather a special native program called the Java
interpreter reads the byte code and executes the corresponding native machine
instructions. Thus to port Java programs to a new platform all that is needed is to port the
interpreter and some of the library routines. Even the compiler is written in Java. The
9
byte codes are precisely defined, and remain the same on all platforms. The second
important part of making Java cross-platform is the elimination of undefined or
architecture dependent constructs. Integers are always four bytes long, and floating point
variables follow the IEEE 754 standard for computer arithmetic exactly.
2.5.6 Java is Multi-Threaded :Java is inherently multi-threaded. A single Java program can have many different
threads executing independently and continuously. Three Java applets on the same page
can run together with each getting equal time from the CPU with very little extra effort
on the part of the programmer. This makes Java very responsive to user input. It also
helps to contribute to Java's robustness and provides a mechanism whereby the Java
environment can ensure that a malicious applet doesn't steal all of the host's CPU cycles.
Unfortunately multithreading is so tightly integrated with Java, that it makes Java rather
difficult to port to architectures like Windows 3.1 or the PowerMac that don't natively
support preemptive multi-threading.
2.6 The Architecture of the Java Virtual Machine :In the Java virtual machine specification, the behavior of a virtual machine
instance is described in terms of subsystems, memory areas, data types, and instructions.
These components describe an abstract inner architecture for the abstract Java virtual
machine. The purpose of these components is not so much to dictate an inner architecture
for implementations. It is more to provide a way to strictly define the external behavior
of implementations. The specification defines the required behavior of any Java virtual
machine implementation in terms of these abstract components and their interactions.
Figure 2.2 shows a block diagram of the Java virtual machine that includes the
major subsystems and memory areas described in the specification. As mentioned in
previous chapters, each Java virtual machine has a class loader subsystem: a mechanism
for loading types given fully qualified names. Each Java virtual machine also has an
execution engine: a mechanism responsible for executing the instructions contained in
the methods of loaded classes. When a Java virtual machine runs a program, it needs
memory to store many things, including byte codes and other information it extracts from
loaded class files, objects the program instantiates, parameters to methods, return values,
local variables, and intermediate results of computations.
10
11
Chapter 3
DESIGN DETAILS
-----------------------------------------------------------------------------------------------------------This software has written in JAVA as frontend. As java is platform independent.
Following are details for java
3.1 JAVA :3.1.1 The Creation of Java :Java was conceived by James Gosling, Patrick Naughton, Chris Warth, Ed Frank,
and Mike Sheridan at Sun Microsystems, Inc. in 1991. It took 18 months to develop the
first working version. This language was initially called Oak but was renamed Java
in 1995. Between the initial implementation of Oak in the fall of 1992 and the public
announcement of Java in the spring of 1995, many more people contributed to the design
and evolution of the language.
Bill Joy, Arthur van Hoff, Jonathan Payne, Frank Yellin, and Tim Lindholm were
key contributors to the maturing of the original prototype. Somewhat surprisingly, the
original impetus for Java was not the Internet! Instead, the primary motivation was the
need for a platform-independent (that is, architecture-neutral) language that could be used
to create software to be embedded in various consumer electronic devices, such as
microwave ovens and remote controls.
The trouble with C and C++ (and most other languages) is that they are designed
to be compiled for a specific target. Although it is possible to compile a C++ program for
just about any type of CPU, to do so requires a full C++ compiler targeted for that CPU.
The Problem is that compilers are expensive and time-consuming to create. An easier
and more cost-efficientsolution was needed. In an attempt to find such a solution,
Gosling and others began work on a portable, platform-independent language that could
be used to produce code that would run on a variety of CPUs under differing
environments. This effort ultimately led to the creation of Java.
3.1.2 The Java Buzzwords :No discussion of the genesis of Java is complete without a look at the Java
buzzwords. Although the fundamental forces that necessitated the invention of Java are
portability and security, other factors also played an important role in molding the final
form of the language. The key considerations were summed up by the Java team in the
following list of buzzwords:
12
Simple
Secure
Portable
Object-oriented
Robust
Multithreaded
Architecture-neutral
Interpreted
High performance
Distributed
Dynamic
3.1.3 Event Handling :3.1.3.1 Events :Event is an object that describes a state change in a source. It can be generated as
consequence of a person interacting with the elements in a graphical user interface. Some
of the activities that cause events to be generated are pressing a button, entering a
character via the keyboard, electing an item in a list, and clicking the mouse.
3.1.3.2 The KeyListener Interface :This interface defines three methods. The keyPressed( ) and keyReleased( )
methods are invoked when a key is pressed and released, respectively. The keyTyped( )
method is invoked when a character has been entered. For example, if a user presses and
releases the A key, three events are generated in sequence: key pressed, typed, and
released. If a user presses and releases the HOME key, two key events are generated in
sequence: key pressed and released. The general forms of these methods are shown here:
void keyPressed(KeyEvent ke)
void keyReleased(KeyEvent ke)
void keyTyped(KeyEvent ke)
3.2 The Java Class Library :The Java class library provides the set of classes that are guaranteed to be
available in any commercial Java environment. Those classes are in the Java package and
include all the classes .The Java Developer's Kit comes with documentation for all of the
java class library, which includes descriptions of each class's instance variables, methods,
constructors, interfaces, and so on. You can get to this documentation (called the Java
Application Programmer's Interface, or API) via the web. A shorter summary of the Java
API is in appendix C as well. Exploring the Java class library and its methods and
13
instance variables is a great way to figure out what java can and cannot do, as well as
how it can become a starting point for your own development.
Here are the class packages that are part of the Java class library:
java.lang- Classes that apply to the language itself, including the Object class, the
string class, and the system class. It also contains the special classes for the
primitive types (Integer, character, float, and so on). You will get at least a glance
vector and Hash table. You'll learn more about these classes in the Bonus week.
java.io- Input and output classes for writing to and reading from streams ( such as
standard input and output ) and for handling files, "Streams and I/O," describes
14
3.3 Window Fundamentals :The AWT defines windows according to a class hierarchy that adds functionality
and specificity with each level. The two most common windows are those derived from
Panel, which is used by applets, and those derived from Frame, which creates a standard
window. Much of the functionality of these windows is derived from their parent classes.
Thus, a description of the class hierarchies relating to these two classes is fundamental to
their understanding. Figure 3.1 shows the class hierarchy for Panel and Frame.
3.3.1 Component :At the top of the AWT hierarchy is the Component class. Component is an
abstract class that encapsulates all of the attributes of a visual component. All user
interface elements that are displayed on the screen and that interact with the user are
subclasses of Component. It defines over a hundred public methods that are responsible
for managing events, such as mouse and keyboard input, positioning and sizing the
window, and repainting.
A Component object is responsible for remembering the current foreground and
background colors and the currently selected text font. Class Description ScrollPane a
container that provides horizontal and/or vertical scroll bars for another component.
System Color contains the colors of GUI widgets such as windows, scroll bars, text, and
15
3.3.4 Window :The Window class creates a top-level window. A top-level window is not
contained within any other object; it sits directly on the desktop. Generally, you wont
create Window objects directly. Instead, you will use a subclass of Window called Frame,
described next.
3.3.5 Frame :Frame encapsulates what is commonly thought of as a window. It is a subclass
of Window and has a title bar, menu bar, borders, and resizing corners. If you create a
Frame object from within an applet, it will contain a warning message, such as Java
Applet Window, to the user that an applet window has been created. This message warns
users that the window they see was started by an applet and not by software running on
their computer. When a Frame window is created by a program rather than an applet, a
normal window is created.
CONCLUSION
-----------------------------------------------------------------------------------------------------------Thus, we implemented project on Multi-platform based Virtual Terminal.
The project consists of one window which has two panels. This can be dynamically
installed on any operating system. It has its own inbuilt commands which are same for all
operating system and can be run manually.
From two panels, the above panel show output or operation of commands and as
in second panel accept the commands.
This project provides multi-platform facility which avoids confusion of user for
using different commands. As user has to remember different commands used in different
operating system this difficulty can be avoided by this multi-platform virtual terminal.
The default command prompts are statically installed in operating system. This terminal
can be installed dynamically and can be used virtually.
17
REFERENCES
------------------------------------------------------------------------------------------------------[1] Complete Reference Java, By H. Shields.
[2] The Linux Command Line, William E. Shotts.
[3] Windows command line reference, by Microsoft.
[4] Software Engineering by Roger S. Pressman.
18