A mini-mart has just installed a bar codereader to improve efficiency at their checkouts. Assume that the bar code is to access a filethat store the product descriptions, unit price and quantity of each product sold in the shop. Assume that there are only 10 products in this mini-mart.
The format of the product stored in the file is shown below :
Barcode : a text string of 4 numeric character
Product description : a text string of 20 characters
Unit price : a floating pointvalue
Quantity : an integer
Design the necessary classes and member functions to achieve the following tasks :
a. Read the list of products available inthe mini-mart from a text file.
b. Allow user to enter the bar code of aproduct via keyboard and the quantity purchase during check out.
c. Display the product description, unitprice, quantity and the total cost of all the products bought by acustomer.
d. Update the quantity of each product instock after a purchase is done.
e. Write the bar code and productdescription to a text file if the level of stock is less than 10.
f. Continue the program until user press a‘Q' to exit.