You are on page 1of 5

String menu = "";

String order = "";


String choice = "";
double choice1;
double order1;
double total1 = 0;
double petso = 60.00;
double paa = 55.00;
double tinae = 6.00;
double atay = 10.00;
double hotdog = 15.00;
double batikonoy = 15.00;
double retaso = 10.00;
double chicken = 15.00;
double pork = 20.00;
double liempo = 150.00;
double manok = 190.00;
double eight = 15.00;
double mismo = 20.00;
double litro = 40.00;
double litro5 = 70.00;
double kanon = 10.00;
double puso = 7.00;
double platter = 50.00;
double change = 0;
double cash = 0;
double changes = 0;

System.out.print("Welcome to Mae's Grill \n");

do {
System.out.println("[A] BBQ");
System.out.println("[B] DRINKS");
System.out.println("[C] RICE");
System.out.println("[D] LECHON");
System.out.println("Enter your choice: ");
menu = sc.nextLine();

switch(menu.charAt(0)){
case 'A':
case 'a':
System.out.println("[A] Petso--------(P60.00)");
System.out.println("[B] Paa----------(P55.00)");
System.out.println("[C] Tina-e-------(P6.00)");
System.out.println("[D] Atay---------(P10.00)");
System.out.println("[E] Hotdog-------(P15.00)");
System.out.println("[F] Batikonoy----(P15.00)");
System.out.println("[G] Retaso-------(P10.00)");
System.out.println("[H] Chicken Skin-(P15.00)");
System.out.println("[I] Pork---------(P20.00)");
choice = sc.nextLine();

switch(choice.charAt(0)){
case 'A':
case 'a':
System.out.print("How many pieces do you want to order Maam/Sir?");
order1 = Double.parseDouble(sc.nextLine());
System.out.print("The cost is: P" + (order1*petso));
total1 = total1 + (order1*petso);
break;

case 'B':
case 'b':
System.out.print("How many pieces do you want to order Maam/Sir?");
order1 = Double.parseDouble(sc.nextLine());
System.out.print("The cost is: P" + (order1*paa));
total1 = total1 + (order1*paa);
break;

case 'C':
case 'c':
System.out.print("How many pieces do you want to order Maam/Sir?");
order1 = Double.parseDouble(sc.nextLine());
System.out.print("The cost is: P" + (order1*tinae));
total1 = total1 + (order1*tinae);
break;

case 'D':
case 'd':
System.out.print("How many pieces do you want to order Maam/Sir?");
order1 = Double.parseDouble(sc.nextLine());
System.out.print("The cost is: P" + (order1*atay));
total1 = total1 + (order1*atay);
break;

case 'E':
case 'e':
System.out.print("How many pieces do you want to order Maam/Sir?");
order1 = Double.parseDouble(sc.nextLine());
System.out.print("The cost is: P" + (order1*hotdog));
total1 = total1 + (order1*hotdog);
break;

case 'F':
case 'f':
System.out.print("How many pieces do you want to order Maam/Sir?");
order1 = Double.parseDouble(sc.nextLine());
System.out.print("The cost is: P" + (order1*batikonoy));
total1 = total1 + (order1*batikonoy);
break;

case 'G':
case 'g':
System.out.print("How many pieces do you want to order Maam/Sir?");
order1 = Double.parseDouble(sc.nextLine());
System.out.print("The cost is: P" + (order1*retaso));
total1 = total1 + (order1*retaso);
break;

case 'H':
case 'h':
System.out.print("How many pieces do you want to order Maam/Sir?");
order1 = Double.parseDouble(sc.nextLine());
System.out.print("The cost is: P" + (order1*chicken));
total1 = total1 + (order1*chicken);
break;

case 'I':
case 'i':
System.out.print("How many pieces do you want to order Maam/Sir?");
order1 = Double.parseDouble(sc.nextLine());
System.out.print("The cost is: P" + (order1*pork));
total1 = total1 + (order1*pork);
break;
default:
System.out.println("INVALID ENTRY!!!");
System.out.println("Please choose the right one. Thank you.");
}
break;

case 'B':
case 'b':
System.out.println("[A] 8 oz Coke/Sprite/Royal-------(P15.00)");
System.out.println("[B] Mismo Coke/Sprite/Royal-------(P20.00)");
System.out.println("[C] 1 Litre Coke/Sprite/Royal-------(P40.00)");
System.out.println("[D] 1.5 Litre Coke/Sprite/Royal-------(P70.00)");
System.out.println("Enter your choice: ");
choice = sc.nextLine();

switch(choice.charAt(0)){
case 'A':
case 'a':
System.out.print("How many 8 oz do you want to order? ");
order1 = Double.parseDouble(sc.nextLine());
System.out.println("The cost is: P"+(order1*eight));
total1 = total1 + (order1*eight);
break;

case 'B':
case 'b':
System.out.print("How many mismo do you want to order? ");
order1 = Double.parseDouble(sc.nextLine());
System.out.println("The cost is: P"+(order1*mismo));
total1 = total1 + (order1*mismo);
break;

case 'C':
case 'c':
System.out.print("How many litre do you want to order? ");
order1 = Double.parseDouble(sc.nextLine());
System.out.println("The cost is: P"+(order1*litro));
total1 = total1 + (order1*litro);
break;

case 'D':
case 'd':
System.out.print("How many 1.5 litre do you want to order? ");
order1 = Double.parseDouble(sc.nextLine());
System.out.println("The cost is: P"+(order1*litro5));
total1 = total1 + (order1*litro5);
break;

default:
System.out.println("INVALID ENTRY!!!");
System.out.println("Please choose the right one. Thank you.");
}
break;
case 'C':
case 'c':
System.out.println("[A] Cup of Rice----(P10.00)");
System.out.println("[B] Puso-----------(P7.00)");
System.out.println("[C] Platter--------(P50.00)");
System.out.println("Enter your choice: ");
choice = sc.nextLine();

switch(choice.charAt(0)){

case 'A':
case 'a':
System.out.println("Enter no. of cups do you want to order: ");
order1 = Double.parseDouble(sc.nextLine());
System.out.print("The cost is: P"+ (order1*kanon));
total1 = total1+ (order1*kanon);
break;

case 'B':
case 'b':
System.out.println("Enter no. of puso do you want to order: ");
order1 = Double.parseDouble(sc.nextLine());
System.out.print("The cost is: P"+ (order1*puso));
total1 = total1+ (order1*puso);
break;

case 'C':
case 'c':
System.out.println("Enter no. of Platter do you want to order: ");
order1 = Double.parseDouble(sc.nextLine());
System.out.print("The cost is: P"+ (order1*platter));
total1 = total1+ (order1*platter);
break;

default:
System.out.print("INVALID ENTRY!!!");
System.out.print("Please choose the right order. Thank you.");
}
break;

case 'D':
case 'd':
System.out.println("[A] Lechon Manok-----(P190.00)");
System.out.println("[B] Liempo-----------(P150.00)");
choice = sc.nextLine();

switch(choice.charAt(0)){

case 'A':
case 'a':
System.out.println("How many Lechon Manok do you want to buy?");
order1 = Double.parseDouble(sc.nextLine());
System.out.print("The cost is: P"+ (order1*manok));
total1 = total1+ (order1*manok);
break;

case 'B':
case 'b':
System.out.println("How many Liempo do you want to buy?");
order1 = Double.parseDouble(sc.nextLine());
System.out.print("The cost is: P"+ (order1*liempo));
total1 = total1+ (order1*liempo);
break;

default:
System.out.print("INVALID ENTRY!!!");
System.out.print("Please choose the right order. Thank you.");

}
}

System.out.print ("\nDo you want to have an additional order Maam/Sir?


(y/n): ") ;
choice = sc.nextLine();

}
while(choice.equalsIgnoreCase("Y")); {
System.out.println("Your total is "+total1);
System.out.print("Your cash is: ");
cash = Double.parseDouble(sc.nextLine());
System.out.println("Your change is: "+ (cash - total1));
changes = Double.parseDouble(sc.nextLine());
}
}
}