
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN: 9780133594140
Author: James Kurose, Keith Ross
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Question
please complete the following
**sample desired output is provided

Transcribed Image Text:Assignment
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
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
(pooj
percent.
Indu
Number of adults, number of children, meal type (D, S), character indicating whether date is a weekend (/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.
uny
Create the data file below using your text editor or Notepad. Run with the following data:
sajnpy
Children Meal Type
Weekend
Deposit
0000
000
D.
00's
23.75
0000s
D.
000
00'0
00'St
00'SLZ
R
3.
000z
000
D.
A
14
0001-
3.
Turn In
Turn in source code, the input file, the output file, and error file.

Transcribed Image Text:Sample output file:
Adult Child
Adult Child
Food
Tip/ SChrg
Total Deposit
Total Discount
Num. Num
Cost
Cost
Cost
Таx
Cost
Due
e 217.50
39.15 17.97 274.62
3 696.60 46.44 743.04 133.75 61.38 938.16
17 3225.00 263.16 3488.16 627.87 0.00 4116.03
15.66 0.00 102.66
10
100.00 174.62
57.50 880.66
0.00 4116.03
0.00 217.5e
4.37
27
30.82
125
144.06
4.
87.00
0,00
87.00
25.00
77.66
1.16
23.75 388.17
500.00 7896.46
25
0.00 326.25 326.25
58.72 26.95 411.92
9.70
43 6450.00 665.64 7115.64 1280.82 0.00 8396.46
0.00
23.22 10.66 162.88
250
276.38
0.00
0.00
0.00
0.00
0.00 129.00
0.00
0.00
0.00 0.00
129.00
275.00 -112.12
-1.68
Sample Error file:
10
R.
Y
10.00
17
3
D
R.
15.00
-3
10
D
Y
20.00
30.00
-10.00
14
-1
20
3.
D
Y
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps

Knowledge Booster
Similar questions
- Instructions for both assignments can be found in the picture linked to this post. The programs must be written in c++ and requires that the random number generator be seeded like this program: Program 3.25 // This program demonstrates random numbers. #include <iostream> #include <cstdlib> // For rand and srand #include <ctime> // For the time function using namespace std; int main() { // Get the system time. unsigned seed = time(0); // Seed the random number generator. srand(seed); // Display three random numbers. cout << rand() << endl; cout << rand() << endl; cout << rand() << endl; return 0; }arrow_forwardHi, I need to answer this question using the C++ programming language. Thank you. Note: I have included a copy of the General Program Format Rules.arrow_forwardExplain the need of header files in cin and cout program.arrow_forward
- INTRODUCTION: In this assignment, you will demonstrate how to write simple programs that get input from the user, produce output, perform simple calculations, make decisions, perform iteration/repetition, and create enumeration types. HOW TO SUBMIT YOUR ASSIGNMENT At the top of each of your C++ programs, you should have at least four lines of documentation: Program name (the C++ file name(s)), Author (your name), Date last updated, and Purpose (a brief description of what the program accomplishes). Here is an example: /* Program name: jbtictactoe.cpp * Author: John Doe * Date last updated: 5/1/2017 * Purpose: Play the game of Tic-Tac-Toe ASSIGNMENT: Movie Data Create a program that uses a structure named MovieData to store the following information about a movie: • Title . Genre . Director • Year Released . Running time (in minutes) Write a program that prompts the user for input and allows all of these member data values to be specified. The program should create two MovieData…arrow_forwardThis assignment will give you practice on basic C programming. You will implement a few Cprogramsarrow_forwardThank-You for your help, but I'm not finished yet. Here's the instructions again for my C++ program: Write a program to implement the algorithm that you designed in Exercise 19 of Chapter 1.Your program should allow the user to buy as many items as the user desires. Instructions for Exercise 19 of Chapter 1 have been posted below for your convenience.Exercise 19 Jason typically uses the Internet to buy various items. If the total cost of the items ordered, at one time, is $200 or more, then the shipping and handling is free; otherwise, the shipping and handling is $10 per item. Design an algorithm that prompts Jason to enter the number of items ordered and the price of each item. The algorithm then outputs the total shipping and handling fee, and the billing amount. Your algorithm must use a loop (repetition structure) to get the price of each item. (For simplicity, you may assume that Jason orders no more than five items at a time.) An example of the program is shown below: Enter the…arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Computer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Concepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningPrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY

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 Engineering
ISBN:9780124077263
Author:David A. Patterson, John L. Hennessy
Publisher:Elsevier Science

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
Computer Engineering
ISBN:9781337093422
Author:Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:Cengage Learning

Prelude to Programming
Computer Engineering
ISBN:9780133750423
Author:VENIT, Stewart
Publisher:Pearson Education

Sc Business Data Communications and Networking, T...
Computer Engineering
ISBN:9781119368830
Author:FITZGERALD
Publisher:WILEY