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:

  1. attrib file.

To make the file read only.

  1. copy fileA fileB

To copy fileA into fileB.

  1. delete file

To delete the file.

  1. 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.

  1. 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).

  1. mkdir name

Makes a directory named name.

  1. date

Displays the current date.

  1. time

Displays the current time.

  1. edit

displays the Notepad editor on the screen.

  1. rename fileA fileB

Renames fileA to fileB.

  1. rmdir name

Removes the directory named name.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!