Programming Assignments
- Program 1 (due February 21, 2007)
- Program 2 (due March 19, 2007)
- program so that you can see expected behavior (right-click, save as type "all files", make sure file name ends with .jar even if you have to type .jar yourself)
Executable Jar file -- should be able to double click to run)
If you cannot double click to run the jar file, you can type " java -jar p2s07sample.jar" at the command prompt. Or you can unzip the file using WinZip or WinRAR, and you can type "jar xvf p2s07sample.jar" at
the command prompt, and then type "java ShopperOwnerDriver" to run.
Note: you must enter the command to start before items can be added to the shopping cart.
As a last resort, go here and right-click and save each .class file individually.
At the command prompt, you can type "java ShopperOwnerDriver" as before. If you are using BlueJ, make an empty project, close BlueJ, copy the files manually into the directory, and then restart BlueJ and open the project.
- Hints (Microsoft Word format)
- More hints from help session
- Program 3 (due April 10, 2007)
- Program 4 (due May 2, 2007)
Tests
- February 16, 2007
- Chapter 2: Sections 1 through 6
- Chapter 3: Sections 1 through 6 (except for printf method)
- Chapter 5: Sections 1 through 3, 5, 8
- Keyboard
- March 16, 2007
- Chapter 4: Sections 1 through 5 (5th edition)
- Chapter 6: Sections 1 through 4, 7, 8
- April 13, 2007
- Final Exam Week Spring 2007
- Chapter 10: Sections 1-6
- File I/O
Exceptions
- IOException
- ClassNotFoundException
Text File Input
- FileReader (constructor)
- BufferedReader (constructor, readLine(), close())
- Integer.parseInt(...), Double.parseDouble(...), etc.
Text File Output
- FileWriter (constructor)
- BufferedWriter (constructor)
- PrintWriter (constructor, print(...), println(...), close())
- java.io.Serializable interface
Object File Input
- FileReader (constructor)
- ObjectInputStream (constructor, Object readObject(), casting,
close())
Object File Output
- FileWriter (constructor)
- ObjectOutputStream (constructor, writeObject(...), close())
- GUIs (sections marked in green in your textbook)
- Chapter 3: Sections 9-11
- Chapter 2: Sections 7-9
- Chapter 4: Sections 6-9
- Chapter 5: Sections 9-12
- Chapter 6: Sections 10-13
- Chapter 8: Sections 6-7
- Chapter 9: Sections 7-8
- Chapter 10: Sections 7-9
Supplemental Reading Material from Head First Java, 2nd edition