Answered » You can buy a ready-made answer or pick a professional tutor to order an original one.
Write a program that will record the purchases made at a store. For each purchase, read from the keyboard an itemâs name, its price, and the number bought. Compute the cost of the purchase (number bought times price), and write all this data to a text file. Also, display this information and the current total cost on the screen. After all items have been entered, write the total cost to both the screen and the file. Since we want to remember all purchases made, you should append new data to the end of the file.
When the program is executed, the casher is presented with a menu to choose from several options:
1. Add transaction or record purchase based on the previous description.
2. Display all purchases of the day on the screen in a well formatted form.
3. Back up all purchases of the day to another file and clear the daily purchase file
(Hint: dealing with file requires you to use exception)
–