Question: Design and implement a simple, interactive shell program that prompt the user for a command, parser the command (you do not need to write a
Design and implement a simple, interactive shell program that prompt the user for a command, parser the command (you do not need to write a parser) and then execute it. The commands are:
- attrib file.
To make the file read only.
- copy fileA fileB
To copy fileA into fileB.
- delete file
To delete the file.
- dir name or just dir
The listing of the directory name is displayed. In case of just dir, the list of the items in the current directory should show up.
- exec Name
The shell should execute the class Name.class. The java file Name.java is the main method (i.e. the method main is declared in this class).
- mkdir name
Makes a directory named name.
- date
Displays the current date.
- time
Displays the current time.
- edit
displays the Notepad editor on the screen.
- rename fileA fileB
Renames fileA to fileB.
- rmdir name
Removes the directory named name.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
