Submission date: 2000.01.28
In order to pass this coursework, you must submit and pass all questions.
Questions that require a program to be written should result in one or more files with a .java extension, all comments should be embedded in the files (with particular emphasis on documentation comments). Questions that require an essay to be written should result in a single file that is one of: a Word file (.doc extension), a FrameMaker file (.fm extension), a LATEX2e file (.ltx extension), an HTML file or a plain ASCII text file (.txt extension).
Write a file copy program in Java. This should be a command line interface so that the line:
java FileCopy fromFile toFile
results in the existing file fromFile being copied to the file toFile. Incorrect invocation should result in a sensible and constructive error message. Potentially disastrous outcomes should result in further interaction with the user to confirm the action.
Write a short essay setting out your analysis of the class, addressing, in particular, the questions: What is the purpose of the abstraction? What is it that is being abstracted? Is this particular class a viable and/or valid abstraction? Is the class a useful one? Is it a well constructed class? What differences in programming are there with and without use of this class? Should this class be ignored or used?
Extend the copy program from Question 1 to create a version of the UNIX tr program. Information about the tr program can be found by looking at its manual page entry. Appropriate manual pages exist on Helium (a Solaris machine) or by booting one of the department's PCs as a Linux machine.
Russel Winder
Last updated: 2000-01-18