Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Solve the question in the photo above. 1. MaxBargain supermarkets has approached you to develop a billing software for their stores. The input is a

image text in transcribed

Solve the question in the photo above.

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 20 N Wine 2 10.990 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 796 if eligible for tax) and price after tax. At the end of the file, print the number of items, the total price, tax and total payable after tax. The dollar amount values should not display more than 2 digits after decimal. Milk 1 3.75 20 N 3.75 2.95 0.00 2.95 Wine 2 10.990 Y 21.98 20.98 1.47 22.45 Butter 1 4.99 5 N 4.99 4.04 0.00 4.04 Flour 4 3.99 0 N 15.96 14.96 0.00 14.96 salmon 3 12.99 0 Y 38.97 37.97 2.66 40.63 ITEM-COUNT 11 AMOUNT $80.90 TAX $4.13 TOTAL-PAYABLE $85.03 2. This is the continuation of the previous question, Make the above program, to a. Add a part where the program is interactive to accept the customer name b. For example: if the user gives input customer name as: Alex, the program process multiple files. and the file name from console input. should read from input file Alex_items.txt and be create the output receipts file as Alex_receipts.txt c. 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) Total No. of items sold: Total Revenue in $) Total Sales tax payable (in ) Revenue after tax (in $

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

Implementing Ai And Machine Learning For Business Optimization

Authors: Robert K Wiley

1st Edition

B0CPQJW72N, 979-8870675855

More Books

Students also viewed these Databases questions

Question

Prove [AB, CD] = AC {D, B} + A {C, B} D C {D, A} B + {C, A} DB.

Answered: 1 week ago

Question

Define organisational structure

Answered: 1 week ago

Question

Define line and staff authority

Answered: 1 week ago

Question

Define the process of communication

Answered: 1 week ago

Question

Explain the importance of effective communication

Answered: 1 week ago

Question

* What is the importance of soil testing in civil engineering?

Answered: 1 week ago

Question

4. Explain the strengths and weaknesses of each approach.

Answered: 1 week ago

Question

3. Identify the methods used within each of the three approaches.

Answered: 1 week ago