In this assignment students are required to implement an


Assignment: Directory Tree

In this assignment, students are required to implement an operating system command that displays the tree structure of a folder or directory. The program asks the user to enter a folder name. Next, the program traverses the tree hierarchy of this folder in a preorder traversal to retrieve the children folders or ?les in the speci?ed folder. As the hierarchy is being traversed, the names of the subfolders or ?les are being displayed in an indented fashion where the amount of indentation re?ects the hierarchy level of the displayed subfolders or ?les. This command should produce an output similar to the tree command in the DOS operating system. The ?gure below shows a display of a partial output of the tree command. Students can experiment with this command by typing tree | more

The Java API provides the File class which can be used to implement this assignment.

Solution Preview :

Prepared by a verified Expert
Operating System: In this assignment students are required to implement an
Reference No:- TGS01701783

Now Priced at $40 (50% Discount)

Recommended (91%)

Rated (4.3/5)