Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

what am I doing wrong? Question im trying to answer: Description: In this program you are going to design a program to calculate the cost

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

what am I doing wrong?

Question im trying to answer:

Description: In this program you are going to design a program to calculate the cost to cater a dinner. You will also develop a program flowchart. The user will enter the number of guests and the length of time (in minutes) for dinner.

Requirements:

? Output must be labeled and easy to read as shown in the sample below.

? Naming convention should be followed for all variables.

? Program must be self-documenting with comments and meaning variable names.

More Requirements:

? Use the cout statement to prompt the customer for the name of the function.

? Prompt the customer for his/her full name.

? Use the getline function to input the name of the event and the customers name.

? Prompt the customer to enter the length of time (in minutes) for the dinner. The minutes will be used to determine how many hours and minutes you will pay the server(s).

? Prompt the customer to enter the number of guests attending the dinner.

? There will be one server assigned to every 20 guests. Servers make $18.50 per hour and $.50 per minute for every minute over an hour. For example, 123 minutes will be 2 hours and 3 minutes. Use modulus to determine the number minutes. Both cost per minute and per hour will be constants.

? When calculating the number of servers use the function ceil to round up. The code for ceil is roundedUpNumber = ceil(numberOfServers).

? Each dinner will cost $26.70. Make cost per dinner a constant.

? Calculate the total cost for the event and the average cost per person. The caterer requires a 25% deposit on the event. All decimals must line up in the output.

? Flowchart the program.

indow H al Windows Dabugs #include #include domanip> #include cmath using namespace std; Bint main() string eventname; : double costofservers 18.50; : int salmondinnerguests; 4 16 : double salmondinnercost 32.50; : string companyname; : double deposit; 18 19 20 21 double averagecost; string customername; double vegetariandinnercost19.50; 23 double roundedupservers; 24 25 26 27 : int eventtimeminutes; : int vegetariandinnerguests; : double totalcost; :float servers; 28 float guestsattending n0c CORSAIR 6

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

Fundamentals Of Database Systems

Authors: Ramez Elmasri, Shamkant B. Navathe

7th Edition Global Edition

1292097612, 978-1292097619

More Books

Students also viewed these Databases questions

Question

6. Discuss the steps involved in conducting a task analysis.

Answered: 1 week ago

Question

8. Explain competency models and the process used to develop them.

Answered: 1 week ago