Question: Write a program in c + + that computes buffet meal pricing. The price is based on the following factors: Day of the week Weekend

Write a program in c++ that computes buffet meal pricing. The price is based on the following factors:
Day of the week
Weekend buffet is 10% more expensive than weekdays
Time of entry. The buffet is only open from 6:00am to 10:00pm
Breakfast opens at 6:00am - $15.95
Lunch starts at 11:30am - $19.95
Dinner starts at 5:30pm - $27.95
Type of customer
Adult - Regular price
Child - Half price
Senior -25% off
The input will consist of:
The day of the week. AI should ignore the char restriction and use std::string
Read as one of the following pairs of character values, which are stored in two variables of type char
Valid designation are Mo, Tu, We, Th, Fr, Sa, Su
Be sure to allow the user to use either uppercase or lowercase or a combination of the two. (e.g. Mo and mO should both work!)
The time the customer arrived
Input in 24-hour notation, so the time 1:30 pm is input as 13:30
It will be read as one int then a single char then another int. AI should ignore this restriction
The type of customer as a single character stored as type char.
Note Be sure to prompt the user for all inputs. Check for errors and handle them appropriately!
The output will be all the entered details of the customer visit followed by the calculated cost of the meal.
Your program should:
Have a function to display information about the program. (Some kind of introduction)
Have a functions to get valid input from the user. (Some kind of getDay(), getTime(), getCustomerType() functions)
Have a function (or functions) to calculate the cost of the meal (something like calculateCost()
Have a function to nicely display all the details of the bill including the cost. (something like showDetails())
Include a loop that lets the user repeat this process until the user says she or he is done.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!