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

Airline Reservation

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