Project description: Write a Java program to simulate an online shopping cart.
A shopping cart is a collection of items selected by a customer for purchase. A user can add items to the cart, remove them, empty the cart, view the items in the cart, view the items in the shop, and end shopping and proceed to checkout.
For step 1 you will be creating the basic objects used to construct and manipulate the shopping cart. These objects are described by the UML diagram in figure 1.
These rules define the conditions that the application must meet ...
You will implement the classes, variables, and methods to allow the shopping cart to function.
When your program begins, you will display a menu of actions the shopper can perform:
SHOPPING CART OPTIONS:
0 exit the program
1 add an item to your cart
2 remove an item from your cart
3 change the quantity of an item in your cart
4 view the items in your cart
5 end shopping and go to checkout
6 empty your cart
7 list the items in the inventory
Using the Java ArrayList class, you will write a program to support these functions. Each item added to the cart will be represented with the Item class (see attached .java files).
Your program will allow the user to perform all the functions listed. The program should continue as long as the user wants to keep going.
You should make use of everything we have studied to date, e.g., use the NumberFormat class to format currency amounts. See image.
Files provide for assignment:
You will need to complete Item.java and Shopping.java so the cart functions as described above. Please submit these two files for the project in WebStudy. You may submit all the files from the project if you wish.