There is a file that contains 5148 items, on seperate lines in the file are: des
ID: 3566393 • Letter: T
Question
There is a file that contains 5148 items, on seperate lines in the file are: description, price, quantity in stock and UPC(universal product code) in that order for each item.
Write a JAVA program that reads the content of the file, creates instances of your retail item and stores them in the array. Prompt the user for the items they want to buy by UPC. If an item matching that UPC is found and available, display all data about the item, decrease quantity in stock by one in the list, and add the price to the total cost. If the user enters a UPC that does not exist, display an appropriate message. If the user enters a UPC and the item is out of stock, display an appropriate message. (Do not charge them for items that are not available.)
When the user is finished entering the UPCs for all the items they want to buy, display their total cost for all items selected and available.
Executions should have at least 5 items for each customer.