Java Programming Assignment 2
This assignment represents 15% of the assessment for the course.
In each case the program should produce an appropriate prompting message before reading data from the keyboard, and should output the answer(s) on a new line with an appropriate message.
Example:
Input right front pressure
38
Input left front pressure
38
Input right rear pressure
42
Input left rear pressure
42
Inflation is OK
Example:
Input right front pressure
32
Warning: pressure is out of range
Input left front pressure
32
Warning: pressure is out of range
Input right rear pressure
42
Input left rear pressure
42
Inflation is BAD
If there have been any warnings, write out a final error message. (Hint: declare a boolean variable goodPressure that is initialized to true but is changed to false when an out of range tire is first found.)
Deadline: Please submit your answers (2 java file attachments) to me by email by 22nd November.
References:
· Savitch Chapter 3.1 contains most of the information.
· Otherwise, a good starting point for tutorial material is http://java.sun.com/docs/books/tutorial/java/index.html
· Otherwise, use Google to search for “java tutorial”
MR
[08/11/2006]