Question: I really need help for this program on C + + . I have no clue what to do . I can't use arrays and
I really need help for this program on C I have no clue what to do I can't use arrays and structures for this lab. I also need to have an input file, an error file, and a output file
ObjectivesTo learn to code, compile and run a program containing functions for a catering company.
Assignmentphase
The problem A catering company needs to calculate the charges for parties they are going to work on
Function : Create a function to input data from a file. See sample data below. Validate the datameal type must be S
or D Weekend must be Y or N deposit cannot be negative. Output errors with appropriate messages to an error file.
Test this module.
Function : Calculate cost of the meals for adults and children. For adults, the deluxe meals will cost $ per person
and the standard meals will cost $ per person. Children's meals will cost percent of adult meals. Everyone
within a given party must be served the same meal type. Return the total cost of the meals.
Function : Calculate additional costs. Calculate tip and tax. All customers will be charged the same rate for tip and tax,
currently percent applied only to the cost of the food Calculate surcharge, currently percent, which is added to
the total bill if the catering is to be done on the weekend Friday Saturday, or Sunday Return the tiptax and the
surcharge.
Function : Calculate total bill and output data to the screen. Output: an itemized bill listing the party ID number of
adults, children, cost for meals, surcharge if appropriate tax and tip, total cost of the party, deposit if any total
balance due.
Input
Party ID Number of adults, number of children, meal type D S character indicating whether or not date is a weekend
YN amount of any deposit. Create the data file below in text editor or Notepad.
Data File
S Y
D Y
D N
S N
S Y
D N
D N
R Y
D R
D Y
D Y
S N
D Y
Output: Screen output showing party ID Number of adults, number of Children,Meal type, total meal cost, taxtip
surcharge, total party cost. Errors show on error file with type of error specified.
To hand in: The structure chart, the program listing, and the output.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
