Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use C++ to solve the problems in the image below. 1. MaxBargain supermarkets has approached you to develop a billing software for their stores. The

Use C++ to solve the problems in the image below.

image text in transcribed

1. MaxBargain supermarkets has approached you to develop a billing software for their stores. The input is a list of products purchased by customers and you need to create a software to calculate the total bill with tax and discounts The format of input file "items.txt" is as follows Milk 1 3.75 20N Wine 2 10.99 0 Y Butter 1 4.99 5 N Flour 4 3.99 0 N Salmon 3 12.99 0 Y The input file is organized as, Product Name, Quantity purchased (number of units), price per unit, discount applicable and if the product is eligible for tax. Create a file "receipt.txt" that shows the following output. Print the input line along with the additional information of, total price for the units purchased, price after discount, tax amount (use 7% if eligible for tax) and price after tax. At the end of the file, print the number of items the total price, tax should not display more than 2 digits after decimal. and total payable after tax. The dollar amount values Milk 1 3.75 20 N 3.75 2.95 0.00 2.95 Wine 2 10.99 0Y 21.98 20.98 1.47 22.45 Butter 1 4.995N4.99 4.04 0.00 4.04 Flour 4 3.99 0 N 15.96 14.96 0.00 14.96 salmon 3 12.99OY 38.97 37.97 2.66 40.63 ITEM-COUNT 11 AMOUNT $80.90 TAX $4.13 TOTAL-PAYABLE $ 8 5?03 2. This is the continuation of the previous question, Make the above program, to process multiple files Add a part where the program is interactive to accept the customer name and the file name from console input. a. For example: if the user gives input customer name as : Alex, the program should read from input file Alex items.txt and be create the output receipts file as Alex receipts.txt If the user says, he does not want to continue, create a report which displays a summarized information. (Display on console and also write to a file consolidated report.txt) c. 1. MaxBargain supermarkets has approached you to develop a billing software for their stores. The input is a list of products purchased by customers and you need to create a software to calculate the total bill with tax and discounts The format of input file "items.txt" is as follows Milk 1 3.75 20N Wine 2 10.99 0 Y Butter 1 4.99 5 N Flour 4 3.99 0 N Salmon 3 12.99 0 Y The input file is organized as, Product Name, Quantity purchased (number of units), price per unit, discount applicable and if the product is eligible for tax. Create a file "receipt.txt" that shows the following output. Print the input line along with the additional information of, total price for the units purchased, price after discount, tax amount (use 7% if eligible for tax) and price after tax. At the end of the file, print the number of items the total price, tax should not display more than 2 digits after decimal. and total payable after tax. The dollar amount values Milk 1 3.75 20 N 3.75 2.95 0.00 2.95 Wine 2 10.99 0Y 21.98 20.98 1.47 22.45 Butter 1 4.995N4.99 4.04 0.00 4.04 Flour 4 3.99 0 N 15.96 14.96 0.00 14.96 salmon 3 12.99OY 38.97 37.97 2.66 40.63 ITEM-COUNT 11 AMOUNT $80.90 TAX $4.13 TOTAL-PAYABLE $ 8 5?03 2. This is the continuation of the previous question, Make the above program, to process multiple files Add a part where the program is interactive to accept the customer name and the file name from console input. a. For example: if the user gives input customer name as : Alex, the program should read from input file Alex items.txt and be create the output receipts file as Alex receipts.txt If the user says, he does not want to continue, create a report which displays a summarized information. (Display on console and also write to a file consolidated report.txt) c

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems 12th Asian Conference ACIIDS 2020 Phuket Thailand March 23 26 2020 Proceedings

Authors: Pawel Sitek ,Marcin Pietranik ,Marek Krotkiewicz ,Chutimet Srinilta

1st Edition

9811533792, 978-9811533792

More Books

Students also viewed these Databases questions

Question

List and describe the problems of the traditional file environment.

Answered: 1 week ago

Question

Explain Coulomb's law with an example

Answered: 1 week ago

Question

What is operating system?

Answered: 1 week ago

Question

What is Ohm's law and also tell about Snell's law?

Answered: 1 week ago