Cruise Ship Boarding You are to write a boarding system for a Cruise ship in java. The system will print a menu with which the user will interact to assign passengers to each cabin of a cruise ship....


do both tasks


Cruise Ship Boarding<br>You are to write a boarding system for a Cruise ship in java. The system will print a menu<br>with which the user will interact to assign passengers to each cabin of a cruise ship.<br>Task 1. Arrays solution. Designa program for a Cruise Ship with twelve cabins using code like the<br>code provided nearthe end of your notes. Start by checking that the code works.<br>Once the basic code runs, put the code for 'Views All cabins' and 'Adds customerto cabin', into<br>separate procedures, and test it works. You can build up yourtest cases as you develop your<br>program (see testing below).<br>Then add a menu system which will allow the user to choose what they want to select. Enteran 'A'<br>to add a customerto a cabin, and a 'V' to view all cabins. Implement each as a method. When an 'A'<br>is pressed, it should do the Add method; a 'V' should do the View method.<br>One by one, add extra methods to do each of the following. The usershould be able to choose from<br>the menu what the program does.<br>Display Empty cabins<br>Delete customerfrom cabin<br>Find cabin from customer name<br>S:<br>E:<br>D:<br>F:<br>Store program data into file<br>Load program data from file<br>L:<br>0: View passengers Ordered alphabetically by name. (Implement your own sort algorithm)<br>Task 2. Classes solution.<br>Create a second version of the Cruise Ship program using an array of<br>Cabin objects. Create a class called Cabin and another class called Passenger. Each cabin should hold<br>up to 3 passengers with the following additional information.<br>First Name.<br>i.<br>i.<br>Surname.<br>ii.<br>Expenses.<br>Addan additional option to the menu. T' that will give the userthe option to print the expenses per<br>passenger as well as the total expenses of all passengers. Otherwise, the program should function as<br>in Task 1.<br>

Extracted text: Cruise Ship Boarding You are to write a boarding system for a Cruise ship in java. The system will print a menu with which the user will interact to assign passengers to each cabin of a cruise ship. Task 1. Arrays solution. Designa program for a Cruise Ship with twelve cabins using code like the code provided nearthe end of your notes. Start by checking that the code works. Once the basic code runs, put the code for 'Views All cabins' and 'Adds customerto cabin', into separate procedures, and test it works. You can build up yourtest cases as you develop your program (see testing below). Then add a menu system which will allow the user to choose what they want to select. Enteran 'A' to add a customerto a cabin, and a 'V' to view all cabins. Implement each as a method. When an 'A' is pressed, it should do the Add method; a 'V' should do the View method. One by one, add extra methods to do each of the following. The usershould be able to choose from the menu what the program does. Display Empty cabins Delete customerfrom cabin Find cabin from customer name S: E: D: F: Store program data into file Load program data from file L: 0: View passengers Ordered alphabetically by name. (Implement your own sort algorithm) Task 2. Classes solution. Create a second version of the Cruise Ship program using an array of Cabin objects. Create a class called Cabin and another class called Passenger. Each cabin should hold up to 3 passengers with the following additional information. First Name. i. i. Surname. ii. Expenses. Addan additional option to the menu. T' that will give the userthe option to print the expenses per passenger as well as the total expenses of all passengers. Otherwise, the program should function as in Task 1.
Jun 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here