Input ** Patriot Cruises** Choose one of the following option: 1. Create Cruise 2. Search Cruise 3. Remove Cruise 4. Sell Cruise Ticket 5. Display All Cruise 6. Exit Enter your choice Cancel OK Message ** Patriot Cruises ** Cruise ID| Cruise Route❘ Ticket Cost Ticket sold Total Earning P001 | Alaska to Jamaika | $300 | 50 | $15000 P002 | Miami to Carrabian | $400 | 70 | $28000 P011 | Bahams to Puerto Rico | $600 | 30 | $18000 Total Crises: 03 Total Earning: $61000 OK

Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter11: Sql Server Databases
Section: Chapter Questions
Problem 15RQ
icon
Related questions
Question

Please answer the JAVA OOP Programming Assignment scenario below:

Patriot Ships is a new cruise line company which has a fleet of 10 cruise ships, each with a capacity of 300 passengers. To manage its operations efficiently, the company is looking for a program that can help track its fleet, manage bookings, and calculate revenue for each cruise.

Each cruise is tracked by a Cruise Identifier (must be 5 characters long), cruise route (e.g. Miami to Nassau), and ticket price. The program should also track how many tickets have been sold for each cruise.

Create an object-oriented solution with a menu that allows a user to select one of the following options:

1. Create Cruise – This option allows a user to create a new cruise by entering all necessary details (Cruise ID, route, ticket price). If the maximum number of cruises has already been created, display an error message.

2. Search Cruise – This option allows to search a cruise by the user provided cruise ID.

3. Remove Cruise – This op on allows a user to delete a cruise. The user must first see a list of all available cruises and then select which one to remove. If the user selects an invalid cruise or if there are no cruises available, display an error message.

4. Book Cruise Ticket – This option allows a user to sell a ticket for one of the cruises. The user selects the cruise and specifies how many tickets to sell. If the user selects an invalid cruise, or if there aren’t enough available seats on the cruise, an error message should be displayed.

5. Display Cruises – This option displays detailed information about all cruises, including the number of tickets sold, total revenue for each cruise, and the number of remaining seats. It should also show the current number of cruises and total revenue generated across all cruises. If no cruises have been created, display an error message.

6. Exit – This option will terminate the program. After completing any action, the program should return to the menu, allowing the user to choose another option. The program will continue until the user selects the exit option.

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 of Object and Static Variable.
  • You are not allowed to use Arraylist. Doing so will significantly impact your score.
  • Your solution must be designed as a modular solution using methods other than main, with each method performing one task. DDC and implementation classes must be separated.
  • 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.
  • Your solution must not use any regular expressions for validation. You must use Character class and String class for ID validation.
  • Your solution may not use any functions or language constructs not covered during IT 106 or this semester’s IT 206 without prior authorization from your instructor, even if you know other functions or language constructs. We want everyone to be on the same "playing field", regardless of previous programming exposure, and get practice with algorithmic design to solve problems (the intent of the course). Using something existing not discussed in class does not give you as much practice as solving the problem yourself. Doing this may lead to a substantial grade penalty, a grade of zero, or an Honor Code inquiry. When in doubt, ask!

 

Hints:

  • Don’t forget what you learned about working with array insertions and deletions from IT 106.
  • Think about what type of validations might be appropriate for this application. Make sure these are all handled.
  • Remember the methods summarizing data on multiple objects should be created in the implementation class

 

Requirements:

1) List and describe the purpose of each class that will be needed to solve this problem

         a. You must separately identify (list) and describe the purpose of each class. One or two sentences per class should be sufficient.

2) Data Definition Class(es) - Create a detailed UML Class Diagram, listing and explaining all class variables, accessors, mutators, special purpose methods, and constructors associated to each data definition class.

3) Write a well-documented, efficient Java program that implements the solution design you identified in 1 to 3 above. Include appropriate documentation as identified in the documentation expectations document.

Input
** Patriot Cruises**
Choose one of the following option:
1. Create Cruise
2. Search Cruise
3. Remove Cruise
4. Sell Cruise Ticket
5. Display All Cruise
6. Exit
Enter your choice
Cancel
OK
Message
** Patriot Cruises **
Cruise ID| Cruise Route❘ Ticket Cost Ticket sold Total Earning
P001 | Alaska to Jamaika | $300 | 50 | $15000
P002 | Miami to Carrabian | $400 | 70 | $28000
P011 | Bahams to Puerto Rico | $600 | 30 | $18000
Total Crises: 03
Total Earning: $61000
OK
Transcribed Image Text:Input ** Patriot Cruises** Choose one of the following option: 1. Create Cruise 2. Search Cruise 3. Remove Cruise 4. Sell Cruise Ticket 5. Display All Cruise 6. Exit Enter your choice Cancel OK Message ** Patriot Cruises ** Cruise ID| Cruise Route❘ Ticket Cost Ticket sold Total Earning P001 | Alaska to Jamaika | $300 | 50 | $15000 P002 | Miami to Carrabian | $400 | 70 | $28000 P011 | Bahams to Puerto Rico | $600 | 30 | $18000 Total Crises: 03 Total Earning: $61000 OK
AI-Generated Solution
AI-generated content may present inaccurate or offensive content that does not represent bartleby’s views.
steps

Unlock instant AI solutions

Tap the button
to generate a solution

Similar questions
Recommended textbooks for you
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage