Write a class that keeps track of concert promotion information. First download ConcertPromoter.java (contains the main method) and put it in your project o Notice that this file has all of the dialog outputs and user inputs already written. o Do NOT modify ConcertPromoter.java • Create a class called Concert that DOES NOT HAVE a main method • Some of the attributes of Concert are o Name o Capacity o Number of Tickets Sold By Phone o . . . Number of Tickets Sold At the Venue o The price of a ticket by phone o The price of a ticket at the venue Create the following Constructors o Default-sets everything to default values o One that has the parameters (in this order) Band name + Capacity + Price by phone + Price at the venue o One that has parameters (in this order) + BandName + Capacity + Number of Tickets Sold By Phone + Number of Tickets Sold At the Venue + The price of a ticket by phone + The price of a ticket at the venue Accessors and Mutators for each variable o Make sure the mutators check for valid values. Create the following Methods o totalNumberOfTicketsSold No parameters Returns the value of the phone tickets plus the venue tickets o tickets Remaining No parameters Returns the value of the capacity minus the total number of tickets sold + o buy Tickets AtVenue 1 parameter that corresponds to the number of tickets being bought returns nothing o buy TicketsByPhone 1 parameter that corresponds to the number of tickets being bought returns nothing o totalSales ◆ No parameters + Returns the value of the ticket at the venue times the number of tickets sold at the venue, plus the tickets by phone times the price of a phone ticket

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
Please write in Java import java.util.Scanner; public class ConcertPromoter { public static void main(String[] args) { Scanner key = new Scanner(System.in); Concert concert = new Concert(); System.out.println("Welcome to the Concert Promotion tool!"); String input = ""; while(input.equalsIgnoreCase("quit")!= true) { System.out.println("Currently the concert featuring the band: "+concert.getBandName()); System.out.println("Has sold "+concert.getNumTicketsSoldByPhone()+" tickets by phone"); System.out.println("Has sold "+concert.getNumTicketsSoldAtVenue()+" tickets at the venue"); System.out.println("And has grossed $"+concert.totalSales()); System.out.println("What would you like to do?\n" + "Enter 1: To change name\n" + "Enter 2: To change ticket by phone price\n" + "Enter 3: To change ticket at venue price\n" + "Enter 4: To add tickets by phone\n" + "Enter 5: To add tickets at the venue\n" + "Enter 6: To find out how many tickets are remaining\n" + "Enter 7: To find out how many total tickets have been sold\n" + "Enter 8: To change the venue's capacity\n" + "Enter 9: To start a new concert\n" + "Enter 0: To Quit\n"); int choice = key.nextInt(); key.nextLine(); switch(choice) { case 1: System.out.println("Enter the name of the band"); concert.setBandName(key.nextLine()); break; case 2: System.out.println("Enter the new price by phone"); concert.setPriceByPhone(key.nextDouble()); break; case 3: System.out.println("Enter the new price at the venue"); concert.setPriceAtVenue(key.nextDouble()); break; case 4: System.out.println("Enter a number of tickets to add by phone"); concert.buyTicketsByPhone(key.nextInt()); break; case 5: System.out.println("Enter a number of tickets to add at the venue"); concert.buyTicketsAtVenue(key.nextInt()); break; case 6: System.out.println("The number of tickets remaining are "+concert.ticketsRemaining()); break; case 7: System.out.println("The number of tickets sold are "+concert.totalNumberOfTicketsSold()); break; case 8: System.out.println("Enter the new capacity"); concert.setCapacity(key.nextInt()); break; case 9: System.out.println("Starting a new concert"); System.out.println("Enter the name of the band"); String name = key.nextLine(); System.out.println("Enter the capacity of the venue"); int capacity = key.nextInt(); System.out.println("Enter the price by phone"); double priceByPhone = key.nextDouble(); System.out.println("Enter the price at the venue"); double priceAtVenue = key.nextDouble(); concert = new Concert(name,capacity,priceByPhone,priceAtVenue); break; case 0: input = "quit"; break; } } } }
Write a class that keeps track of concert promotion information.
First download Concert Promoter.java (contains the main method) and put it in your project
o
Notice that this file has all of the dialog outputs and user inputs already written.
o Do NOT modify ConcertPromoter.java
Create a class called Concert that DOES NOT HAVE a main method.
Some of the attributes of Concert are
.
o Name
o
o
o
o
o
Create the following Constructors
o
o
Capacity
Number of Tickets Sold By Phone
Number of Tickets Sold At the Venue
The price of a ticket by phone
The price of a ticket at the venue
Default - sets everything to default values
One that has the parameters (in this order)
◆ Band name
+
Capacity
+ Price by phone
Price at the venue
o One that has parameters (in this order)
◆ BandName
+ Capacity
Number of Tickets Sold By Phone
Number of Tickets Sold At the Venue
The price of a ticket by phone
The price of a ticket at the venue
Accessors and Mutators for each variable
o Make sure the mutators check for valid values.
Create the following Methods
o
totalNumberOfTicketsSold
No parameters
Returns the value of the phone tickets plus the venue tickets
o tickets Remaining
◆ No parameters
Returns the value of the capacity minus the total number of tickets sold
o buyTicketsAtVenue
1 parameter that corresponds to the number of tickets being bought
returns nothing
o buy TicketsByPhone
1 parameter that corresponds to the number of tickets being bought
returns nothing
o totalSales
No parameters
Returns the value of the ticket at the venue times the number of tickets sold at the
venue, plus the tickets by phone times the price of a phone ticket
Transcribed Image Text:Write a class that keeps track of concert promotion information. First download Concert Promoter.java (contains the main method) and put it in your project o Notice that this file has all of the dialog outputs and user inputs already written. o Do NOT modify ConcertPromoter.java Create a class called Concert that DOES NOT HAVE a main method. Some of the attributes of Concert are . o Name o o o o o Create the following Constructors o o Capacity Number of Tickets Sold By Phone Number of Tickets Sold At the Venue The price of a ticket by phone The price of a ticket at the venue Default - sets everything to default values One that has the parameters (in this order) ◆ Band name + Capacity + Price by phone Price at the venue o One that has parameters (in this order) ◆ BandName + Capacity Number of Tickets Sold By Phone Number of Tickets Sold At the Venue The price of a ticket by phone The price of a ticket at the venue Accessors and Mutators for each variable o Make sure the mutators check for valid values. Create the following Methods o totalNumberOfTicketsSold No parameters Returns the value of the phone tickets plus the venue tickets o tickets Remaining ◆ No parameters Returns the value of the capacity minus the total number of tickets sold o buyTicketsAtVenue 1 parameter that corresponds to the number of tickets being bought returns nothing o buy TicketsByPhone 1 parameter that corresponds to the number of tickets being bought returns nothing o totalSales No parameters Returns the value of the ticket at the venue times the number of tickets sold at the venue, plus the tickets by phone times the price of a phone ticket
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Math class and its different methods
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education