Commit 4cdacb64 authored by charlie.hamer's avatar charlie.hamer

Airline Reservation

parent ae726aa4
...@@ -40,7 +40,7 @@ public class airline { ...@@ -40,7 +40,7 @@ public class airline {
public static void Class(){ public static void Class(){
int fclass ; //variable to determine class String fclass ; //variable to determine class
System.out.print("Choose a flight class-" System.out.print("Choose a flight class-"
...@@ -48,14 +48,14 @@ public class airline { ...@@ -48,14 +48,14 @@ public class airline {
+ "\nPlease type 2 for Business" + "\nPlease type 2 for Business"
+ "\nPlease type 3 for Economy \n"); + "\nPlease type 3 for Economy \n");
while(true){ while(true){
switch(fclass = input.nextInt()) { switch(fclass = input.next()) {
case 1: //if user chooses first class case "1": //if user chooses first class
first(); first();
break; break;
case 2://if user chooses business class case "2"://if user chooses business class
business(); business();
break; break;
case 3://case if user chooses economy class case "3"://case if user chooses economy class
economy(); economy();
break; break;
default://case if user chooses an invalid option default://case if user chooses an invalid option
......
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