Your program will be called with a command-line filename. You will get all input from that file. Besides that change, the problem to solve is described at You are given a choice of problems to solve, each found at the programming challenges website. You may choose from:
I recommend that you download the problems from their website in case it goes down again.You need to submit your solutions to me. You should email them to me with the following subject line: "CS146Spring06: Program 6x TaylorDS", without the quotes, and where TaylorDS is replaced by your last name and initials, and where x is replaced by a or b, depending on which problem you solve. (Vito's Family is problem a, Railroads is problem b.)
Just to let you know: the first problem is easier. The second problem is for those of you who want to move (slightly) towards more complex, real-world applications. I have a much larger, complex, real-world railroad scheduling problem, which I would like to find a Master's student to work on as a Master's project. I am assigning this problem as an option, not because it is easier than the other problem, but in case somebody decides they find the motivation interesting enough to take up a larger project.
The email should be empty, other than an attached file of source code, in a single text file named "Prog6x.java" (no quotes). This file should contain a class called Prog6x so that it can be compiled. In both of these cases, x should be replaced by a or b, depending on which problem you answer. I should be able to compile it, and run it on a test case of my own with no fuss. Please follow these directions carefully, as the process will be (hopefully) automated. I will allow you to use any fairly recent version of Java, but 1.4 and earlier will not recognize the Scanner class.
I will be running javadoc on your program, so for those of you who have not been adding proper documententation, you need to start now.
Note: both the input and output format are precisely specified for the problem. If you assume a different input format, your program may or may not work correctly. If you give a different output, your solution will be rejected. The input should be taken from the file specified by the filename given to your program as a command line argument. Make no assumptions not in the problem specification. I will be automating the testing of your programs, and the automated system will not be very forgiving. It should not take great effort for me to get your code to run.