Read all of chapter 6 (pages 85-98) in Think Java.
Thursday, September 20
Description
Exceptions
Homework
Download the ScannerCalc.java starter file and the sample solution. The program reads lines of input containing simple numeric expressions (like "4 + 3") and calculates the result. You must use a Scanner to parse the input, and printf() to display the results. The program only needs to understand 2 operands and one operator (longer chains of input are errors). To run the solution, open the Terminal and type "java -jar " and then drag the solution JAR into your Terminal window. There should be a space between the "-jar" and the filename. Due Monday at the beginning of class.
Read all of chapter 7 (pages 105-117) in Think Java. This should largely be review. Hint: Section 7.6 has a nice chunk of code that you can model your ScannerCalc code on (a loop that checks for a certain type of input).
Friday, September 21
Description
ScannerCalc
Homework
Finish ScannerCalc lab, due at the start of next class. It should be beautifully commented with your name and ready to turn in. I'll go over how to submit it at the start of class.
Reminder, to zip up your project, execute a command like the following:
(cd /path/to/project/folder && zip -r ~/Desktop/name_of_zip .)