Question
How to write a program that Concert Promoter. Consider a class ConcertPromoter that records the tickets sold for a performance. Before the day of the
How to write a program that Concert Promoter.
Consider a class ConcertPromoter that records the tickets sold for a performance. Before the day of the concert, tickets are sold only over the phone. Sales on the day of the performance are made only in person at the concert venue. The class has the following attributes:
The name of the band
The capacity of the venue
The number of tickets sold
The price of a ticket sold by phone
The price of a ticket sold at the concert venue
The total sales amount
Whether sales are currently made by phone or at venue
It has the following methods:
Constructor
Record the sale of one of more tickets
Change from phone sales to sales at the concert venue
Return the number of tickets sold
Return the number of tickets remaining
Return the total sales from the concert
All other methods used by your class should be declared as private. You can make any additional private methods that you like.
(a) Implement the above class, making sure to comment each method in your class.
(b) Write a program using the ConcertPromoter class you wrote that will be used to record sales for a concert. Your program should record phone sales, then sales at the venue. As tickets are sold, the number of seats remaining should be displayed. At the end of the program, display the number of tickets sold and the total sales amount for the concert.
Sample input/output for concert promoter:
Concert Promoter Sales Program started Sell tickets (S), Change to venue sales (V), Finish selling ) How many tickets to sell? (Maximum 100) 30 The cost of the tickets is 300.0 Tickets remaining: 70 Sell tickets (S), Change to venue sales (V), Finish selling (F) Tickets remaining: 70 Sell tickets (S), Finish selling F) How many tickets to sell? (Maximum 70) The cost of the tickets is 0.0 Tickets remaining 15 Sell tickets (S), Finish selling (F) How many tickets to sell? (Maximum 15) 20 Sorry, unable to complete that sale Tickets remaining: 15 Sell tickets (S), Finish selling F) Tickets remaining: 15 Final report: Sales for The Ducks: Tickets sold: 85 for 960.0 Concert Promoter Sales Program started Sell tickets (S), Change to venue sales (V), Finish selling ) How many tickets to sell? (Maximum 100) 30 The cost of the tickets is 300.0 Tickets remaining: 70 Sell tickets (S), Change to venue sales (V), Finish selling (F) Tickets remaining: 70 Sell tickets (S), Finish selling F) How many tickets to sell? (Maximum 70) The cost of the tickets is 0.0 Tickets remaining 15 Sell tickets (S), Finish selling (F) How many tickets to sell? (Maximum 15) 20 Sorry, unable to complete that sale Tickets remaining: 15 Sell tickets (S), Finish selling F) Tickets remaining: 15 Final report: Sales for The Ducks: Tickets sold: 85 for 960.0
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started