Question: I NEED TO DO IT WITH THIS CODE, CAN YOU HELP ME TO COMPLETE IT, THANK YOU 1 2 3 4 5 6 7 8

 I NEED TO DO IT WITH THIS CODE, CAN YOU HELP

I NEED TO DO IT WITH THIS CODE, CAN YOU HELP ME TO COMPLETE IT, THANK YOU

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53

// Chapter 3 - Programming Challenge 10, Box Office // This program calculates a theater's gross and net profit. #include #include #include // Needed by most compilers to use strings using namespace std; int main() { const double THEATER_PCT = .80, // Percent of gross kept by theater DISTRIBUTOR_PCT = .20, // Percent of gross paid to distributor ADULT_PRICE = 10.00, // Price of an adult ticket CHILD_PRICE = 6.00; // Price of a child ticket string movieName; // Name of the movie /* Declare 3 double variables with these names: - grossRevenue - netRevenue - distributorAmt */ int adultTickets, // Number of adult tickets sold childTickets; // Number of child tickets sold // Get input from user cout //Code the statement that accepts string input with an embedded blank from the user cout > adultTickets; cout > childTickets; // Calculate gross and net profits and distributor payment grossRevenue = (adultTickets * ADULT_PRICE) + (childTickets * CHILD_PRICE); netRevenue = THEATER_PCT * grossRevenue; distributorAmt = DISTRIBUTOR_PCT * grossRevenue; // Display results cout //code the statement that displays float data with 2 places after the decimal point cout

Remember to add the following statement before the return statement:

system("pause");

Highlighted sections of the code indicate the lines that you have to add in order to complete the program

Use the data shown in the program to test your program.

Tasks to be completed

Download lab1_incomplete.cpp from BlackBoard or by clicking this link. Alternatively, you may copy code from this document

Rename the document as per the Programming Standards document

Make the following changes to the program:

In lines 18-21, declare the double variables shown in the comment block. These variables are used in the program and must be declared.

In line 29, code the statement to accept string data from the user, making sure to use the statement that allows the user to input a string with an embedded blank. (hint: use getline, not cin >>)

In line 47, code statements to ensure that float data is displayed with 2 places after the decimal point.

Refer to the Programming Standards document and follow the rules stated there in order to complete the program.

Submit Instructions

Submit one of the following via BlackBoard's submission tool.

Zipped solution folder created by Visual Studio

Program cpp file

Introduction The program asks for input from the user, processes the information and displays its results back to the user 10. Box Office A movie theater only keeps 80 percent of the revenue earned from ticket sales. The other 20 percent goes to the distributor. Write a program that calculates a theater's gross and net box office revenue for a night. The program should ask for the name of the movie, and how many adult and child tickets were sold. (The price of an adult ticket is $10 and a child's ticket is $6.) It should display a report similar to the following ovie Name: Adult Tickets Sold: "Wheels of Fury 382 These 3 variables are populated from user input. Other variables are calculated in the program. hild Tickets Sold: Gross Box Office Revenue: Amount Paid to Distributor Net Box Office Revenue: 27 4582.00 $916.40 3665.60 Note that the name of the movie contains an embedded blank! (You do not have to place code to print out the double quotes around the name of the movie!) lab1 incomplete.cpp For this lab, you have been provided with a partially completed file. You will need to complete the program. Code is as follows

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 Databases Questions!