You create the main program called POSmain.java and two classes: ShoppingCart and CashRegister….
You create the main program called POSmain.java and two classes: ShoppingCart and CashRegister….
You create the main program called POSmain.java and two classes: ShoppingCart and CashRegister. Your POSmain program should take three file names from command line arguments. The first file contains a list of products and their prices; the second and third files are lists of items in two shopping carts of two customers. The POSmain program should first read the price file, then read each of the cart files to load a list of items in a shopping cart and store them in a ShoppingCart objects. The price file may contain a variable number of products and the cart files may contain a variable number of items. POSmain then will create a CashRegister object by passing the price list to it. The POSmain program then will use the CashRegister object to scan items in a cart and print a receipt for each shopping cart one by one. At last, POSmain will use the CashRegister object to print a report for the day.