Question: NEED JAVA CODE JOPTION PANE ONLY. CHECK EXPECTED DC Bus Tours has asked you to create a new application that will keep track of their

NEED JAVA CODE JOPTION PANE ONLY. CHECK EXPECTED

DC Bus Tours has asked you to create a new application that will keep track of their different bus tours. DC Bus Tours has 15 buses with a capacity of 40 seats each.

Each Bus tour is tracked by a Bus Tour Identifier (must be 4 characters long with the first two being upper case characters and the last two being only digits), Name of the Bus and general ticket cost. Additionally, each bus tour should track how many seats have been sold.

Create a program with a menu that allows a user to select one of the following options:

Create Bus Tour This option will allow a user to create a new bus tour by entering all information about the bus tour. However, if the maximum number of bus tours (15) has already been reached, an error message should display instead.

Remove Bus Tour This option will allow a user to delete a bus tour from service. To enable this, the user must first see a list of all bus tours available. The user may then select which bus tour to delete. However, if the user chooses an invalid bus tour, or if there are no bus tour to choose from, the user should be provided with an error message.

Sell Tour Ticket This option will allow a user to sell a ticket for one of the bus tours by selecting a bus tour. If the user chooses an invalid bus tour, or if there are no seats available for the specified type, then user should be provided with an error message.

Display Bus Tours This option will allow a user to view all information about all bus tours, including the number of tickets sold and the money earned. However, if there are no bus tour created, the user should be provided with an error message. This option will also show the current number of bus tours entered and total amount of money earned from selling tickets across all current bus tours.

Exit This option will exit the program.

Upon completion of the action from the menu item, the user should be prompted to select another menu item. This will continue until the user has selected to exit the program.

Note:

You may assume a user will NOT enter two bus tours with the same ID and bus name.

Your solution must use object-oriented techniques (No points earned for a procedural solution).

Your solution must demonstrate use of arrays

Your solution must be designed as a modular solution using methods other than main, with each method performing one task.

Your solution must include appropriate constants, constructors, accessors, mutators, and special purpose methods (including a toString() method) with exception handling, as necessary in support of the problem.

Your solution must not import any Java library other than JOptionPane.

You may not use System.exit, or any variant that exits the program in the middle of the program. The program should only exit once the algorithm has finished completing.

NEED JAVA CODE JOPTION PANE ONLY. CHECK EXPECTED DC Bus Tours hasasked you to create a new application that will keep track of

**DC Bus Tours Choose one of the following option: 1. Create Bus Tour 2. Remove Bus Tour 3. Sell Tour Ticket 4. Display Bus Tour 5. Display Report 6. Exit Enter your choice *DC Bus Tours** Bus Tour ID| Bus Name| Ticket Cost| Ticket sold| Total Earning DC01 | Red Bus $3020$600 DC09 | Big Bus $2530$750 DC11 Green Bus $4018$720 Total Bus Tours: 03 Total Earning: $2070

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!