Assignment #15

Instructions

  1. Write a Java application as described in assignment #14.
  2. For assignment #15, add the following code to assignment #14:
    1. Change the name of the client program from LastNameFirstName14.java to LastNameFirstName15.java.
    2. Create GroceryItemInterface.java, which has all the method prototypes of class GroceryItem.
    3. Add this statement to the first line of class GroceryItem: implements GroceryItemInterface
    4. Make sure your program compiles, runs, and has the output below.
    5. The output will not change - you are just writing the interface. Usually, we write the interface first, but this will give you an idea about what an interface is and how to write an interface.

Example Output

item		price		count		amount
bananas		$0.99		22		$21.78
oranges		$2.99		4		$11.96
garlic		$3.99		8		$31.92
grapes		$9.99		2		$19.98
papayas		$4.99		6		$29.94

					TOTAL: $115.58

Click to validate the HTML code

Click to validate the CSS code