Write Simple "Directory Traversal" Program.
Write a program using either Java, C#, or C++ that simulates the directory listing commands of popular operating command shells. You will support the following commands:
list
lists the entries in the current directory horizontally
listall
prints a hierarchical listing of the current directory subtree (starting from the current node)
chdir
changes directory to the named, adjacent subdirectory
up
moves up the tree to the parent (like cd ..)
count
prints the number of files (not directories) in the current directory
countall
prints the number of files (not directories) in the subtree starting from the current node
q
quit the program