Commit ae726aa4 authored by charlie.hamer's avatar charlie.hamer

Airline Reservation

parent bfe0da99
...@@ -47,6 +47,7 @@ public class airline { ...@@ -47,6 +47,7 @@ public class airline {
+ "\nPlease type 1 for First Class" + "\nPlease type 1 for First Class"
+ "\nPlease type 2 for Business" + "\nPlease type 2 for Business"
+ "\nPlease type 3 for Economy \n"); + "\nPlease type 3 for Economy \n");
while(true){
switch(fclass = input.nextInt()) { switch(fclass = input.nextInt()) {
case 1: //if user chooses first class case 1: //if user chooses first class
first(); first();
...@@ -59,8 +60,8 @@ public class airline { ...@@ -59,8 +60,8 @@ public class airline {
break; break;
default://case if user chooses an invalid option default://case if user chooses an invalid option
System.out.println("Invalid option. Please choose a number from 1 to 3");//prints out an error message System.out.println("Invalid option. Please choose a number from 1 to 3");//prints out an error message
return; break;
} }}
} }
private static void first() { private static void first() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment