Plan and code a program utilizing one file for input and two files for output to solve the following problem: A. For adults, the deluxe meals will cost $25.80 per person and the standard meals will cost $21.75 per person, dessert included. Children's meals will cost 60 percent of adult meals. Everyone within a given party must be served the same meal type. B. All customers will be charged the same rate for tip and tax, currently 18 percent (applied only to the cost of the food). C. A surcharge, currently 7 percent, is added to the total bill if the catering is to be done on the weekend (Saturday, or Sunday). D. To induce customers to pay promptly, a discount is offered if payment is made within ten days. This discount depends on the amount of the total bill. If the bill is less than $100.00, the discount is 1.5 percent; if the bill is at least $100.00 but less than $400.00, the discount is 2.5 percent; if the bill is $400.00 or more, the discount is 3.5 percent. Input Number of adults, number of children, meal type (D, S), character indicating whether date is a weekend (Y/N), amount of any deposit. Output Output an itemized bill listing the number of adults, children, cost for adult meals, cost for children meals, total food cost, surcharge (if appropriate), tax and tip, total cost of the party, deposit (if any), total balance due, amount of discount if bill is paid within ten days. Output error data to a separate error file. Label all output clearly. Be sure your output file contains data that was input in addition to the results of your program processing. Create the data file below using your text editor or Notepad. Run Create the data file below using your text editor or Notepad. Run with the following data: Adults Children Meal Type Weekend Deposit Y 100.00 10 27 3 D Y 57.50 0.00 125 17 25.00 4 Y 23.75 25 43 D 500.00 250 0.00 Y 10.00 10 0. R 15.00 17 3. Y 275.00 0. D Y 20.00 -3 10 N 30.00 14 -1 Y -10.00 20 3.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
100%

please complete the following program in c++ and avoid using any advanced manipulators, strings, or global variables. Also please share your outuput results. (sample desired results are shown) Many Thanks

Plan and code a program utilizing one file for input and two files for output to solve the following problem:
A. For adults, the deluxe meals will cost $25.80 per person and the standard meals will cost $21.75 per person,
dessert included. Children's meals will cost 60 percent of adult meals. Everyone within a given party must be
served the same meal type.
B. All customers will be charged the same rate for tip and tax, currently 18 percent (applied only to the cost of the
food).
C. A surcharge, currently 7 percent, is added to the total bill if the catering is to be done on the weekend (Saturday,
or Sunday).
D. To induce customers to pay promptly, a discount is offered if payment is made within ten days. This discount
depends on the amount of the total bill. If the bill is less than $100.00, the discount is 1.5 percent; if the bill is at
least $100.00 but less than $400.00, the discount is 2.5 percent; if the bill is $400.00 or more, the discount is 3.5
percent.
Input
Number of adults, number of children, meal type (D, S), character indicating whether date is a weekend (Y/N), amount
of
any deposit.
Output
Output an itemized bill listing the number of adults, children, cost for adult meals, cost for children meals, total food
cost, surcharge (if appropriate), tax and tip, total cost of the party, deposit (if any), total balance due, amount of
discount if bill is paid within ten days. Output error data to a separate error file. Label all output clearly. Be sure your
output file contains data that was input in addition to the results of your program processing. Create the data file below
using your text editor or Notepad.
Run
Create the data file below using your text editor or Notepad. Run with the following data:
Adults
Children
Meal Type
Weekend
Deposit
Y.
100.00
10
D.
Y
57.50
27
0.00
125
17
N.
25.00
4
25
Y
23.75
N.
500.00
250
43
0.00
R.
Y
10.00
10
D.
15.00
17
Y
275.00
Y
20.00
-3
10
30.00
14
-1
Y
-10.00
20
Transcribed Image Text:Plan and code a program utilizing one file for input and two files for output to solve the following problem: A. For adults, the deluxe meals will cost $25.80 per person and the standard meals will cost $21.75 per person, dessert included. Children's meals will cost 60 percent of adult meals. Everyone within a given party must be served the same meal type. B. All customers will be charged the same rate for tip and tax, currently 18 percent (applied only to the cost of the food). C. A surcharge, currently 7 percent, is added to the total bill if the catering is to be done on the weekend (Saturday, or Sunday). D. To induce customers to pay promptly, a discount is offered if payment is made within ten days. This discount depends on the amount of the total bill. If the bill is less than $100.00, the discount is 1.5 percent; if the bill is at least $100.00 but less than $400.00, the discount is 2.5 percent; if the bill is $400.00 or more, the discount is 3.5 percent. Input Number of adults, number of children, meal type (D, S), character indicating whether date is a weekend (Y/N), amount of any deposit. Output Output an itemized bill listing the number of adults, children, cost for adult meals, cost for children meals, total food cost, surcharge (if appropriate), tax and tip, total cost of the party, deposit (if any), total balance due, amount of discount if bill is paid within ten days. Output error data to a separate error file. Label all output clearly. Be sure your output file contains data that was input in addition to the results of your program processing. Create the data file below using your text editor or Notepad. Run Create the data file below using your text editor or Notepad. Run with the following data: Adults Children Meal Type Weekend Deposit Y. 100.00 10 D. Y 57.50 27 0.00 125 17 N. 25.00 4 25 Y 23.75 N. 500.00 250 43 0.00 R. Y 10.00 10 D. 15.00 17 Y 275.00 Y 20.00 -3 10 30.00 14 -1 Y -10.00 20
Sample output file:
Total Deposit
Total Discount
Adult Child
Cost
Tip/ SChrg
Таx
Adult Child
Food
Num
Num
Cost
Cost
Cost
Due
4.37
274.62
46.44 743.04 133.75 61.38 938.16
0.00 4116.03
10
0 217.50
0.00 217.50
39.15 17.97
100.00 174.62
30.82
144.06
27
3.
696.60
57.50 880.66
125
17 3225.00 263.16 3488.16 627.87
0.00 4116.03
1.16
25.00
23.75
87.00
0.00
87.00
15.66 0.00 102.66
77.66
25
0.00 326.25 326.25
58.72 26.95 411.92
388.17
9.70
43 6450.00665.64 7115.64 1280.82 0.00 8396.46 500.00 7896.46 276.38
0.00
23.22 10.66
250
0.00
-1.68
0.00
0.00
162.88
0.00
0.00
0.00
0 0.00
0.00
5.
0.
129.00
0.00
129.00
275.00 -112.12
Sample Error file:
10
Y
10.00
17
15.00
-3
10
D.
Y
20.00
14
-1
N.
30.00
20
Y
-10.00
Transcribed Image Text:Sample output file: Total Deposit Total Discount Adult Child Cost Tip/ SChrg Таx Adult Child Food Num Num Cost Cost Cost Due 4.37 274.62 46.44 743.04 133.75 61.38 938.16 0.00 4116.03 10 0 217.50 0.00 217.50 39.15 17.97 100.00 174.62 30.82 144.06 27 3. 696.60 57.50 880.66 125 17 3225.00 263.16 3488.16 627.87 0.00 4116.03 1.16 25.00 23.75 87.00 0.00 87.00 15.66 0.00 102.66 77.66 25 0.00 326.25 326.25 58.72 26.95 411.92 388.17 9.70 43 6450.00665.64 7115.64 1280.82 0.00 8396.46 500.00 7896.46 276.38 0.00 23.22 10.66 250 0.00 -1.68 0.00 0.00 162.88 0.00 0.00 0.00 0 0.00 0.00 5. 0. 129.00 0.00 129.00 275.00 -112.12 Sample Error file: 10 Y 10.00 17 15.00 -3 10 D. Y 20.00 14 -1 N. 30.00 20 Y -10.00
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 5 steps with 5 images

Blurred answer
Similar questions
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY