Java Assigment
This program will work with file IO and exception handling by building a simple text-based interface for browsing the file system.
When the program starts it should ask the user if they would like to dump results to a log file IN ADDITION to standard out. If so, your program should prompt for the name of the log file. If the file already exists, it’s contents should be overwritten.
The program will then display (6) options to the user:
(1) List the contents of a directory provided by the user
(2) List the contents of a directory provided by the user as well as all of its sub directories. (hint: use recursion)
(3) Locate a file with a given name.
(4) Locate files with a given file extension
(5) Concatenate the contents of 2 files whose names are provided by the user and output the result to a third file (name also provided by the user)
(6) Exit
In addition, provide additional (useful) options in addition to those listed above. For example, locating files based on regular expression matches in the file name or the file content. Be creative. Have fun.
Design: Make sure to design the program so that the file system functionality is encapsulated in its own class or classes. Specifically, you should design so that it would be trivial to hook up these features to a GUI rather than the command line. (This means the main function should have almost no code in it, and that all command-line user interaction should be separate of file browsing implementation, etc.)
14 years ago
20
Answer(0)
Bids(0)
other Questions(10)
- St.Louis lies near both the ocean and the mountains,Vancouver,British, Columbia, hasca mild climate with rainy winters. What Geographic them is...
- Make a 5 sentence explaining the inside of earth and how it works.
- In which stage would each of the following be? Be sure to answer the questions with full sentences, and justify...
- On March 31, Hopi Hospital had assets of $500,000, liabilities of $300,000, and net assets of $200,000. During April,...
- Write a 3-4 page academic, argumentative essay setting forth what you think, being careful to frame your argument as a...
- solve0.3-0.005x=0.2x-0.1
- What is y=4
- What were the accounts receivable (net) for Coca-Cola and PepsiCo at the end of 2009? Which company reports the greater allowance for doubtful accounts receivable (amount and percentage of gross receivable) at the end of 2009?
- In the book the child called it, why does David get stabbed
- 1 + 3 - - 2 8