Question

A movie theater only keeps a percentage of the revenue earned from ticket sales. The remainder...

A movie theater only keeps a percentage of the revenue earned from ticket sales. The remainder goes to the movie distributor. Write a program that calculates a theater’s gross and net box office profit for a night. The program should ask for the name of the movie, and how many adult and child tickets were sold and the price of adult and price of the child ticket. It should display a report similar to:

Movie Name:

“Wheels of Fury”

Adult Tickets Sold:

Child Tickets Sold:

Price of Adult Ticket

Price of Child Ticket

Gross Box Office Profit:

Net Box Office Profit:

Amount Paid to Distributor:

Assume the theater keeps 20 percent of the gross box office profit.

Homework Answers

Answer #1

SOURCE CODE:

*Please follow the comments to better understand the code.

**Please look at the Screenshot below and use this code to copy-paste.

***The code in the below screenshot is neatly indented for better understanding.

This is a very big question.
I have solved all of them.
Please give me an upvote dear, Much Appreciated.!!

#include<iostream>
#include<iomanip>
#include<string>

using namespace std;

int main()
{
// declare the variables here
string movieName;
double at, ct, gb, nb, cut;
// initialise the adult price and child price.
double a = 6.00, c = 3.00;
  
cout << "Enter the name of the movie: ";
getline(cin, movieName);
cout << "Enter number of adult tickets sold: ";
cin >> at;
cout << "Enter number of child tickets sold: ";
cin >> ct;
  
gb = (at * a) + (ct * c);
//Theather keeps 20% of the box office profit
nb = gb * 0.20;
cut = gb - nb;
  
//left to left justify, setw(30) to set the number of spaces in first column
//right to right justify again, setw(20) followed by " or $, which will be printed at the right (justified)
cout << left << setw(30) << "Movie Name:" << right << setw(20) << '"' << movieName << '"' << endl;
cout << left << setw(30) << "Adult Tickets Sold:" << right << setw(20) << " " << setw(5) << at << endl;
cout << left << setw(30) << "Child Tickets Sold:" << right << setw(20) << " " << setw(5) << ct << endl;
cout << setprecision(2) << fixed;
//setw(8) << gb is to specify the number of spaces used to print and align the values
cout << left << setw(30) << "Gross Box Office Profit:" << right << setw(20) << "$" << setw(8) << gb << endl;
cout << left << setw(30) << "Net Box Office Profit:" << right << setw(20) << "$" << setw(8) << nb << endl;
cout << left << setw(30) << "Amount Paid to Distributor:" << right << setw(20) << "$" << setw(8) << cut << endl << endl;
  
return 0;
}

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
A theater owner agrees to donate a portion of gross ticket sales to a charity •The...
A theater owner agrees to donate a portion of gross ticket sales to a charity •The program will prompt the user to input: −Movie name −Adult ticket price −Child ticket price −Number of adult tickets sold −Number of child tickets sold −Percentage of gross amount to be donated •Inputs: movie name, adult and child ticket price, # adult and child tickets sold, and percentage of the gross to be donated •The program needs to: 1.Get the movie name 2.Get the...
Directions: Develop an E-R (or EER depending upon need) Diagram. List all assumptions. Show the version...
Directions: Develop an E-R (or EER depending upon need) Diagram. List all assumptions. Show the version 1 (entities and data only) and version 3 (entities, attributes and relationships with cardinalities and participation constraints). 20 points of the grade will be based on evaluating your assumptions - you must give a detailed list of your assumptions identifying anchor concepts, data associated with the anchor and data that has more than one anchor participating in it. Remember, we are not talking out...
Buddies is a charitable organization that sponsors group activities and provides adult companionship for troubled youths...
Buddies is a charitable organization that sponsors group activities and provides adult companionship for troubled youths from single-parent families. Buddies screens, trains, motivates, and supervises the adult volunteers, who are paired with children referred by local agencies and by parents concerned with their children’s future. The organization provides a service that can augment any professional help a child may be receiving. But its main role is one of prevention by providing a meaningful adult relationship for a child before the...
Buddies is a charitable organization that sponsors group activities and provides adult companionship for troubled youths...
Buddies is a charitable organization that sponsors group activities and provides adult companionship for troubled youths from single-parent families. Buddies screens, trains, motivates, and supervises the adult volunteers, who are paired with children referred by local agencies and by parents concerned with their children’s future. The organization provides a service that can augment any professional help a child may be receiving. But its main role is one of prevention by providing a meaningful adult relationship for a child before the...
Buddies is a charitable organization that sponsors group activities and provides adult companionship for troubled youths...
Buddies is a charitable organization that sponsors group activities and provides adult companionship for troubled youths from single-parent families. Buddies screens, trains, motivates, and supervises the adult volunteers, who are paired with children referred by local agencies and by parents concerned with their children’s future. The organization provides a service that can augment any professional help a child may be receiving. But its main role is one of prevention by providing a meaningful adult relationship for a child before the...
Please read the article and answear about questions. Determining the Value of the Business After you...
Please read the article and answear about questions. Determining the Value of the Business After you have completed a thorough and exacting investigation, you need to analyze all the infor- mation you have gathered. This is the time to consult with your business, financial, and legal advis- ers to arrive at an estimate of the value of the business. Outside advisers are impartial and are more likely to see the bad things about the business than are you. You should...
Delta airlines case study Global strategy. Describe the current global strategy and provide evidence about how...
Delta airlines case study Global strategy. Describe the current global strategy and provide evidence about how the firms resources incompetencies support the given pressures regarding costs and local responsiveness. Describe entry modes have they usually used, and whether they are appropriate for the given strategy. Any key issues in their global strategy? casestudy: Atlanta, June 17, 2014. Sea of Delta employees and their families swarmed between food trucks, amusement park booths, and entertainment venues that were scattered throughout what would...
What role could the governance of ethics have played if it had been in existence in...
What role could the governance of ethics have played if it had been in existence in the organization? Assess the leadership of Enron from an ethical perspective. THE FALL OF ENRON: A STAKEHOLDER FAILURE Once upon a time, there was a gleaming headquarters office tower in Houston, with a giant tilted "£"' in front, slowly revolving in the Texas sun. The Enron Corporation, which once ranked among the top Fortune 500 companies, collapsed in 2001 under a mountain of debt...
Discuss ethical issues that can be identified in this case and the mode of managing ethics...
Discuss ethical issues that can be identified in this case and the mode of managing ethics Enron finds itself in this case. How would you describe the ethical culture and levels of trust at Enron? Provide reasons for your assessment. THE FALL OF ENRON: A STAKEHOLDER FAILURE Once upon a time, there was a gleaming headquarters office tower in Houston, with a giant tilted "£"' in front, slowly revolving in the Texas sun. The Enron Corporation, which once ranked among...
Discuss how the respective organizations’ relations with stakeholders could have potentially been affected by the events...
Discuss how the respective organizations’ relations with stakeholders could have potentially been affected by the events that took place at Enron and how the situation could have been dealt with differently to prevent further damage? THE FALL OF ENRON: A STAKEHOLDER FAILURE Once upon a time, there was a gleaming headquarters office tower in Houston, with a giant tilted "£"' in front, slowly revolving in the Texas sun. The Enron Corporation, which once ranked among the top Fortune 500 companies,...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT