You are on page 1of 2

import java.util.

*;
class air
{
Scanner sc=new Scanner(System.in);
int days,seat;
double bill;
public static void main()
{
System.out.println("");
Airline_Reservation ob=new Airline_Reservation();
ob.input();
ob.billcalc();
}
void input()
{
System.out.println("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
System.out.println();
System.out.println("Dear customer");
System.out.println("A warm welcome to our online booking site,for the greatest
travelling flight in Bangalore");
System.out.println();
System.out.println("be a native weekend tourist trip,or be an international tourist
coming");
System.out.println("to witness the wonders of Malayasia,be assured that we will
take up");
System.out.println("the responsibility of making you land safely and your stay a
memorable one.");
System.out.println();
System.out.println("Do you want to book a ticket in our grand flight?");
System.out.println("Please reply with Yes/No:");
if((sc.nextLine()).equalsIgnoreCase("Yes"));
{
System.out.println();
System.out.println("please state your date of visit,and the no. of days you intend
to stay");
System.out.print("Date:");
date=sc.nextLine();
System.out.println();
System.out.print("Number of Days:");
days=sc.nextInt();
}
else
{
System.exit(0);
}
}
void billcalc()
{
int rate=0;
if(rname.equals("Economy"));
rate=8000;
else if(rname.equals("Buisness"));
rate=5000;
else if(rname.equals("Domestic"));
rate=7000;
disp();
}
}
void disp(int n)
{
System.out.println();
System.out.println(" _ ");
System.out.println(" |_ ) * | |");
System.out.println(" |_ ) * |_ |_");
System.out.println();
System.out.println(" FLY EMIRATES ");
System.out.println( ^^^^^^^^^^^^ );
System.out.println();
System.out.println("Flight name: "+ ob.Flight);
System.out.println("date of journey :"+ dd+"/"+mm+"/"+yy);
System.out.println("Departure from:"+ob.ss);
System.out.println("Destination to :"+ob.ds);
System.out.println("gate no."+ob.code);
System.out.println("seat no."+ob.code);
System.out.println();
System.out.println("gross amount="+n);
System.out.println("net amount="+bill);
System.out.println();
System.out.println("please enter the mode of payment :");
String mode=sc.nextLine();
System.out.println("THANK YOU! !");
}
}

You might also like