Thread: Copying a File
View Single Post
Old 10-26-2012, 09:44 PM   PM User | #16
OldBlue
New to the CF scene

 
Join Date: Oct 2012
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
OldBlue is an unknown quantity at this point
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);
copy.commandParser(args);

Is that incorrect though?

Last edited by OldBlue; 10-26-2012 at 09:56 PM..
OldBlue is offline   Reply With Quote