Professional Documents
Culture Documents
Sen
Sen
Sen
import java.lang.*;
import java.util.Scanner;
String name,email;
int age,count,time;
String date,departure,destination;
String travel_class;
int bus_class=120,eco_class=180;
destination=sc.next();
switch(destination)
case "Nagpur":
System.out.println("------------------------------------------------------------------");
time=sc.nextInt();
switch(time)
case 1:
System.out.println();
System.out.println("Dear customer the vacant seats for this flight are 30, among which \n18 seats
are of economic class and 12 are of business class\nKindly choose your seat so that we can confirm
the booking ");
break;
case 2:
System.out.println();
System.out.println("Dear customer the vacant seats for this flight are 40, among which \n15 seats
are of economic class and 25 are of business class\nKindly choose your seat so that we can confirm
the booking ");
break;
case 3:
System.out.println();
System.out.println("Dear customer the vacant seats for this flight are 12, among which \n8 seats are
of economic class and 4 are of business class\nKindly choose your seat so that we can confirm the
booking ");
break;
case 4:
System.out.println();
System.out.println("Dear customer the vacant seats for this flight are 30, among which \n18 seats
are of economic class and 12 are of business class\nKindly choose your seat so that we can confirm
the booking ");
break;
break;
case "Delhi":
System.out.println("------------------------------------------------------------------");
switch(time)
case 1:
System.out.println();
System.out.println("Dear customer the vacant seats for this flight are 30, among which \n18 seats
are of economic class and 12 are of business class\nKindly choose your seat so that we can confirm
the booking ");
break;
case 2:
System.out.println();
System.out.println("Dear customer the vacant seats for this flight are 40, among which \n15 seats
are of economic class and 25 are of business class\nKindly choose your seat so that we can confirm
the booking ");
break;
case 3:
System.out.println();
System.out.println("Dear customer the vacant seats for this flight are 12, among which \n8 seats are
of economic class and 4 are of business class\nKindly choose your seat so that we can confirm the
booking ");
break;
case 4:
System.out.println();
System.out.println("Dear customer the vacant seats for this flight are 30, among which \n18 seats
are of economic class and 12 are of business class\nKindly choose your seat so that we can confirm
the booking ");
break;
break;
case "Banglore":
System.out.println("------------------------------------------------------------------");
System.out.println("1) 10:05 | 14:35 | Indigo ");
time=sc.nextInt();
switch(time)
case 1:
System.out.println();
System.out.println("Dear customer the vacant seats for this flight are 30, among which \n18 seats
are of economic class and 12 are of business class\nKindly choose your seat so that we can confirm
the booking ");
break;
case 2:
System.out.println();
System.out.println("Dear customer the vacant seats for this flight are 40, among which \n15 seats
are of economic class and 25 are of business class\nKindly choose your seat so that we can confirm
the booking ");
break;
case 3:
System.out.println();
System.out.println("Dear customer the vacant seats for this flight are 12, among which \n8 seats are
of economic class and 4 are of business class\nKindly choose your seat so that we can confirm the
booking ");
break;
case 4:
System.out.println();
System.out.println("Dear customer the vacant seats for this flight are 30, among which \n18 seats
are of economic class and 12 are of business class\nKindly choose your seat so that we can confirm
the booking ");
break;
}
default:
break;
//package Nagpur
package Nagpur;
import java.lang.*;
import java.util.*;
String name,email;
int age,count,time;
String date,departure,destination;
String travel_class;
int bus_class=120,eco_class=180;
destination=sc.next();
switch(destination)
case "Delhi":
System.out.println("------------------------------------------------------------------");
time=sc.nextInt();
switch(time)
case 1:
System.out.println();
System.out.println("Dear customer the vacant seats for this flight are 30, among which \n18 seats
are of economic class and 12 are of business class\nKindly choose your seat so that we can confirm
the booking ");
break;
case 2:
System.out.println();
System.out.println("Dear customer the vacant seats for this flight are 40, among which \n15 seats
are of economic class and 25 are of business class\nKindly choose your seat so that we can confirm
the booking ");
break;
case 3:
System.out.println();
System.out.println("Dear customer the vacant seats for this flight are 12, among which \n8 seats are
of economic class and 4 are of business class\nKindly choose your seat so that we can confirm the
booking ");
break;
case 4:
System.out.println();
System.out.println("Dear customer the vacant seats for this flight are 30, among which \n18 seats
are of economic class and 12 are of business class\nKindly choose your seat so that we can confirm
the booking ");
break;
case "Banglore":
{
System.out.println(" departure time | arrival time | Flight ");
System.out.println("------------------------------------------------------------------");
time=sc.nextInt();
switch(time)
case 1:
System.out.println();
System.out.println("Dear customer the vacant seats for this flight are 30, among which \n18 seats
are of economic class and 12 are of business class\nKindly choose your seat so that we can confirm
the booking ");
break;
case 2:
System.out.println();
System.out.println("Dear customer the vacant seats for this flight are 40, among which \n15 seats
are of economic class and 25 are of business class\nKindly choose your seat so that we can confirm
the booking ");
break;
case 3:
System.out.println();
System.out.println("Dear customer the vacant seats for this flight are 12, among which \n8 seats are
of economic class and 4 are of business class\nKindly choose your seat so that we can confirm the
booking ");
break;
case 4:
System.out.println();
System.out.println("Dear customer the vacant seats for this flight are 30, among which \n18 seats
are of economic class and 12 are of business class\nKindly choose your seat so that we can confirm
the booking ");
break;
}
break;
case "Mumbai":
System.out.println("------------------------------------------------------------------");
time=sc.nextInt();
switch(time)
case 1:
System.out.println();
System.out.println("Dear customer the vacant seats for this flight are 30, among which \n18 seats
are of economic class and 12 are of business class\nKindly choose your seat so that we can confirm
the booking ");
break;
case 2:
System.out.println();
System.out.println("Dear customer the vacant seats for this flight are 40, among which \n15 seats
are of economic class and 25 are of business class\nKindly choose your seat so that we can confirm
the booking ");
break;
case 3:
System.out.println();
System.out.println("Dear customer the vacant seats for this flight are 12, among which \n8 seats are
of economic class and 4 are of business class\nKindly choose your seat so that we can confirm the
booking ");
break;
case 4:
System.out.println();
System.out.println("Dear customer the vacant seats for this flight are 30, among which \n18 seats
are of economic class and 12 are of business class\nKindly choose your seat so that we can confirm
the booking ");
break;
break;
default:
break;
//package Banglore
package Bang;
import java.lang.*;
import java.util.*;
String name,email;
int age,count,time;
String date,departure,destination;
String travel_class;
int bus_class=120,eco_class=180;
destination=sc.next();
switch(destination)
{
case "Nagpur":
System.out.println("------------------------------------------------------------------");
time=sc.nextInt();
switch(time)
case 1:
System.out.println();
System.out.println("Dear customer the vacant seats for this flight are 30, among which \n18 seats
are of economic class and 12 are of business class\nKindly choose your seat so that we can confirm
the booking ");
break;
case 2:
System.out.println();
System.out.println("Dear customer the vacant seats for this flight are 40, among which \n15 seats
are of economic class and 25 are of business class\nKindly choose your seat so that we can confirm
the booking ");
break;
case 3:
System.out.println();
System.out.println("Dear customer the vacant seats for this flight are 12, among which \n8 seats are
of economic class and 4 are of business class\nKindly choose your seat so that we can confirm the
booking ");
break;
case 4:
System.out.println();
System.out.println("Dear customer the vacant seats for this flight are 30, among which \n18 seats
are of economic class and 12 are of business class\nKindly choose your seat so that we can confirm
the booking ");
break;
break;
case "Mumbai":
System.out.println("------------------------------------------------------------------");
time=sc.nextInt();
switch(time)
case 1:
System.out.println();
System.out.println("Dear customer the vacant seats for this flight are 30, among which \n18 seats
are of economic class and 12 are of business class\nKindly choose your seat so that we can confirm
the booking ");
break;
case 2:
System.out.println();
System.out.println("Dear customer the vacant seats for this flight are 40, among which \n15 seats
are of economic class and 25 are of business class\nKindly choose your seat so that we can confirm
the booking ");
break;
case 3:
System.out.println();
System.out.println("Dear customer the vacant seats for this flight are 12, among which \n8 seats are
of economic class and 4 are of business class\nKindly choose your seat so that we can confirm the
booking ");
break;
case 4:
System.out.println();
System.out.println("Dear customer the vacant seats for this flight are 30, among which \n18 seats
are of economic class and 12 are of business class\nKindly choose your seat so that we can confirm
the booking ");
break;
break;
case "Delhi":
System.out.println("------------------------------------------------------------------");
time=sc.nextInt();
switch(time)
case 1:
System.out.println();
System.out.println("Dear customer the vacant seats for this flight are 30, among which \n18 seats
are of economic class and 12 are of business class\nKindly choose your seat so that we can confirm
the booking ");
break;
case 2:
System.out.println();
System.out.println("Dear customer the vacant seats for this flight are 40, among which \n15 seats
are of economic class and 25 are of business class\nKindly choose your seat so that we can confirm
the booking ");
break;
case 3:
System.out.println();
System.out.println("Dear customer the vacant seats for this flight are 12, among which \n8 seats are
of economic class and 4 are of business class\nKindly choose your seat so that we can confirm the
booking ");
break;
case 4:
System.out.println();
System.out.println("Dear customer the vacant seats for this flight are 30, among which \n18 seats
are of economic class and 12 are of business class\nKindly choose your seat so that we can confirm
the booking ");
break;
break;
default:
break;
package Delhi;
import java.lang.*;
import java.util.*;
String name,email;
int age,count,time;
String date,departure,destination;
String travel_class;
int bus_class=120,eco_class=180;
destination=sc.next();
switch(destination)
case "Banglore":
System.out.println("------------------------------------------------------------------");
time=sc.nextInt();
switch(time)
case 1:
System.out.println();
System.out.println("Dear customer the vacant seats for this flight are 30, among which \n18 seats
are of economic class and 12 are of business class\nKindly choose your seat so that we can confirm
the booking ");
break;
case 2:
System.out.println();
System.out.println("Dear customer the vacant seats for this flight are 40, among which \n15 seats
are of economic class and 25 are of business class\nKindly choose your seat so that we can confirm
the booking ");
break;
case 3:
System.out.println();
System.out.println("Dear customer the vacant seats for this flight are 12, among which \n8 seats are
of economic class and 4 are of business class\nKindly choose your seat so that we can confirm the
booking ");
break;
case 4:
System.out.println();
System.out.println("Dear customer the vacant seats for this flight are 30, among which \n18 seats
are of economic class and 12 are of business class\nKindly choose your seat so that we can confirm
the booking ");
break;
case "Nagpur":
System.out.println("------------------------------------------------------------------");
time=sc.nextInt();
switch(time)
case 1:
System.out.println();
System.out.println("Dear customer the vacant seats for this flight are 30, among which \n18 seats
are of economic class and 12 are of business class\nKindly choose your seat so that we can confirm
the booking ");
break;
case 2:
System.out.println();
System.out.println("Dear customer the vacant seats for this flight are 40, among which \n15 seats
are of economic class and 25 are of business class\nKindly choose your seat so that we can confirm
the booking ");
break;
case 3:
System.out.println();
System.out.println("Dear customer the vacant seats for this flight are 12, among which \n8 seats are
of economic class and 4 are of business class\nKindly choose your seat so that we can confirm the
booking ");
break;
case 4:
System.out.println();
System.out.println("Dear customer the vacant seats for this flight are 30, among which \n18 seats
are of economic class and 12 are of business class\nKindly choose your seat so that we can confirm
the booking ");
break;
break;
case "Mumbai":
System.out.println("------------------------------------------------------------------");
switch(time)
case 1:
System.out.println();
System.out.println("Dear customer the vacant seats for this flight are 30, among which \n18 seats
are of economic class and 12 are of business class\nKindly choose your seat so that we can confirm
the booking ");
break;
case 2:
System.out.println();
System.out.println("Dear customer the vacant seats for this flight are 40, among which \n15 seats
are of economic class and 25 are of business class\nKindly choose your seat so that we can confirm
the booking ");
break;
case 3:
System.out.println();
System.out.println("Dear customer the vacant seats for this flight are 12, among which \n8 seats are
of economic class and 4 are of business class\nKindly choose your seat so that we can confirm the
booking ");
break;
case 4:
System.out.println();
System.out.println("Dear customer the vacant seats for this flight are 30, among which \n18 seats
are of economic class and 12 are of business class\nKindly choose your seat so that we can confirm
the booking ");
break;
break;
default:
break;
}
}
//Main file
import java.util.*;
import Bang.Banglore;
import Mumbai.Mumbai;
import Delhi.Delhi;
import Nagpur.Nagpur;
class airline
String travel_class,name,date;
int eco_class=180,bus_class=120,count,age,i=0;
System.out.println();
name=sc.next();
date=sc.next();
System.out.println();
System.out.println("Dear user kindly select your departure from the below: ");
System.out.println("1.Delhi\n2.Banglore\n3.Nagpur\n4.Mumbai");
String departure=sc.next();
switch(departure)
case "Delhi":
obj1.d();
break;
case "Mumbai":
obj2.mum();
break;
case "Nagpur":
obj3.nag();
break;
case "Banglore":
obj4.Ban();
break;
default:
System.out.println("Dear customer, the flights for "+departure+" are not available, sorry for the
inconvienece");
System.exit(0);
break;
System.out.println();
System.out.println("How many tickets do you want to book and in which class: ");
count = sc.nextInt();
travel_class=sc.next();
eco_class= eco_class-count;
else
bus_class=bus_class-count;
System.out.println("Dear customer, QR code for payment with amount has been send to your mail,
kindly pay the amount and confirm your booking");