Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 16 to 16 of 16
Thread: Copying a File
10-26-2012, 09:44 PM #16
- Join Date
- Oct 2012
- Thanked 0 Times in 0 Posts
I'm afraid I don't have an answer for your first question. If it does not affect the way that the program executes, then I don't care at this point. (no offense).
The test conditions that I provided are supposed to cause an exception in the program per the exceptions listed under commandParser method. For instance, if the user enters java FileCopy sourceFileName.txt to sourceFileName.txt an error should occur. I did fix all of the compares involving strings (= or == to .equals or !xx.equals). Wasn't thinking...
I guess by calling the commandParser() method in the main, it would evaluate the syntax of the command line, would it not? I just don't know how to implement that. Would it apply to the copy object as in
FileCopy copy = new FileCopy(srcFileName, dstFileName);
Is that incorrect though?
Last edited by OldBlue; 10-26-2012 at 09:56 PM.