- This assignment is comprised of creating a Grocery Store item calculator.
The behavior and layout of this program should be as in the example below. Total points for this assignment will be
100 points. This assignment is due on or before
Tue, Nov 26th.
All objects and techniques necessary for this assignment have been (or will be) covered in class.

- You should refer to the programming guidelines and
follow all guidelines presented there. Failure to adhere to any of the assignment
specifications/programming guidelines will result in loss of points.
- Make sure to keep a copy of the source code that you turn in.
- Please feel free to ask questions/send e-mail if any items require clarification.
Hints & Updates
: (updated Tue, Nov 10)
- Pay close attention to the algorithm presented in class. Failure to follow this will most likely
result in faulty program execution.
- Make sure you follow the instructions for null (pointer) results as presented in class.
- You must use the constructor(s), getter(s) and setter(s) methods presented in class
here.
- You will need to use a non fixed, iterative control structure to allow item price
input. Termination of this structure will be a result of empty price input (e.g. an empty
input OR a cancel). Recall the string.isEmpty() or string.length() discussion in class.
- Following correct data entry (terminated by OK), the Item Price, Sub Total and Number of Items
fields should be refreshed.
- Tax and Total Sale values are calculated following OK or Cancel clicks.
- You should be certain that all invalid data is trapped. Anticipate what kind
of invalid data may be entered. This will require some logical decisions and
relational operations. As mentioned in class, negative values (as well as 0) are
allowed.
- You should assign the return value from the InputDialog
function to a variable of type String. Use this variable to determine when the
looping control structure should terminate. Refer to the InputDialog link on the syllabus.
- Use the NumberFormat formatter = NumberFormat.getCurrencyInstance();
statement to format the output as currency (as done before).
- Do not hesitate to use the debugging techniques discussed
in class (e.g. set a breakpoint at the InputDialog statement) to examine the results of the
return values from the InputDialog method.
- You might want to use a constant for the tax rate (of 6.5%).
- Do not hesitate to refer to the Oracle help pages on the syllabus.