Please work with the same partner as last week. This program will count as two lab grades.
In this lab, you will finish up the check printing program from
last week's lab and also add some new
features to it. Remember, this program only requires a few
well-designed if
statements. If you find yourself
writing code that's starting to look like a pile of spaghetti,
please stop and think about your algorithm again, or ask me.
substring
and
toUpperCase
methods that we've learned about, and
there is a hard way to do this ...)
double
value
to a String
it doesn't include the extra 0 -- you
need an if statement to check for this case and add the extra
0 to the string that is printed out.)
Finally, instead of printing your checks out on the screen, modify your program so that it saves the printed check to a text file in the current directory. The output file should be given the name "CheckXYZ.txt", where XYZ is the check number. After getting the check information from the user, your program should open the output file, print the check to the output file, and display a message on the screen informing the user that the check has been saved to a file (also tell the user the file name).
For this exercise, you may modify the CheckDriver.java file
as well as your own Check.java file. Make sure to turn in
both files.
Hand in a printout of your Check.java and CheckDriver.java files and also upload them to the VikingWeb. If you want more time to work on the extra credit, you may submit your solutions by next week's lab session, October 14, but no later than that.