Consider a class ConcertPromoter that records the tickets sold for a performance. Before the day of the concert, tickets are sold only 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 tickets sold by phone
- The price of a ticket sold at the concert venue
- The total sales amount
It has methods to
- Record the sale of one or 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 for ma concert
- a. Write a method heading for each method.
- b. Write preconditions and postconditions for each method.
- c. Write some Java statements that test the class.
- d. Implement the class.
- e. List any additional methods and attributes needed in the implementation that were not listed in the original design. Let any other changes made to the original design.
- f. Write a
program using the class you wrote for Part d 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.
Want to see the full answer?
Check out a sample textbook solutionChapter 5 Solutions
Java: An Introduction To Problem Solving And Programming Plus Mylab Programming With Pearson Etext -- Access Card Package (8th Edition)
Additional Engineering Textbook Solutions
Java How to Program, Early Objects (11th Edition) (Deitel: How to Program)
Thinking Like an Engineer: An Active Learning Approach (4th Edition)
Starting Out with Java: From Control Structures through Data Structures (4th Edition) (What's New in Computer Science)
Mechanics of Materials (10th Edition)
Introduction To Programming Using Visual Basic (11th Edition)
Electric Circuits. (11th Edition)
- (Using R language)arrow_forwardAfter our initial deployment for our ML home based security system, the first steps we took to contribute further to the project, we conducted load testing, tested and optimize for low latency, and automated user onboarding. What should be next?arrow_forwardWhy investing in skills and technology is a critical factor in the financial management aspect of system projects.arrow_forward
- Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage LearningEBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTEBK JAVA PROGRAMMINGComputer ScienceISBN:9781305480537Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT
- Microsoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,C++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage LearningProgramming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:Cengage