import java.util.*;
public class MenuBoatHire {
private BoatHireCompany RowingBoat = new BoatHireCompany("Titanic");
private Scanner kybd = new Scanner(System.in);
public static void main(String [] args)
{
MenuBoatHire mbhire = new MenuBoatHire();
mbhire.go();
}
public void go() {
System.out.println("Welcome to Octagon Boat Hire");
int choice = showMenu();
while (choice !=4)
switch (choice) {
case 1:
addRowingBoat();
break;
case 2:
break;
case 3:
break;
default:
System.out.println("Invalid Option, please try again");
}
choice = showMenu();
}
public int showMenu() {
System.out.println("Please selection an Option");
System.out.println("1: Add Rowing Boat");
System.out.println("2: Add Pedal Boat");
System.out.println("3: Find a Boat");
System.out.println("4: Exit");
return kybd.nextInt();
}
public void addRowingBoat() {
kybd.nextLine();
System.out.println("Please Enter A Boat Name");
String landmarks = kybd.nextLine();
System.out.println("Plese Enter An ID Number For This Boat");
String rowingBoatID = kybd.nextLine();
RowingBoat x = new RowingBoat(landmarks, rowingBoatID);
if (RowingBoat.addRowingBoat(x))
System.out.println("New Rowing Boat Added");
else
System.out.println("Sorry, No more Boats can be added");
}
}