You create the main program called [login to view URL] 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 and store them in a Map collection, then it reads each of the cart file to load a list of items in a shopping cart and store them in a ShoppingCart object.
POSmain then will create a CashRegister object by passing the price list to it. The POSmain program then will use the CashRegister object to can 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 .
In your program, you should use the most suitable data structures and associated algorithms provided by Java Collections where appropriate.