Cha
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
633
On Slideshare
633
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
29
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. * To change this template, choose Tools | Templates * and open the template in the editor. */ package project; import java.util.Scanner; /** * * @author charlotte */ public class Project { /** * @param args the command line arguments */ public static void main(String[] args) throws InterruptedException{ Scanner JJ = new Scanner(System.in); Scanner Je = new Scanner(System.in); int a=0, b=0,c=0,d=0; int a1=0, b1=0, c1=0,d1=0; int a2=0, b2=0, c2=0,d2=0; int a3=0, b3=0, c3=0,d3=0; int a4=0, b4=0, c4=0; int a6=0, b6=0, c6=0,d6=0; int a5=0, b5=0, c5=0; int D=0,A3=0,A5; int e1=0,r1=0,t1=0,w1=0,w2=0,e2=0,r2=0,t2=0,w3=0,e3=0,r3=0,t3=0,w4=0,e4=0,r4=0,t4=0, w5=0,e5=0,r5=0,t5=0,w6=0,e6=0,r6=0,t6=0,w7=0,e7=0,r7=0,t7=0; String A2,A8=""; int A4; String A1,Try = "y",Try2 = "n"; char A1char,A2char,Trychar,A8char,Trychar2; while (Try.equalsIgnoreCase("Y")){ System.out.println("~==============: MY RESTAURANT :==============~"); System.out.println(" :~*MAIN MENU*~"); System.out.println(" [A] - CHICKEN"); System.out.println(" [B] - BEEF"); System.out.println(" [C] - PORK"); System.out.println(" [D] - VEGETABLES"); System.out.println(" [E] - FISH"); System.out.println(" [F] - DESSERT"); System.out.println(" [G] - DRINKS"); System.out.print("Please enter your choice here: "); A1 = JJ.next().toUpperCase(); A1char = A1.charAt(0); switch (A1char){ case 'A': System.out.println("CHICKEN"); System.out.println("[A] - Adobo------------------ 75.00/order"); System.out.println("[B] - BBQ-------------------- 75.00/oder"); System.out.println("[C] - Chicken Ala King------- 100.00/order"); System.out.println("[D] - Chicken Afritada------- 90.00/order"); D++; System.out.print("Input Your Order Here: "); A2 = JJ.next().toLowerCase(); A2char = A2.charAt(0); switch (A2char){ case 'a': a=75;
  • 2. w1++; a=w1*75; System.out.println("You Ordered Adobo @75/Order"); break; case 'b': b=75; e1++; b=e1*75; System.out.println("You Ordered BBQ @75/Order"); break; case 'c': c=100; r1++; c=r1*100; System.out.println("You Ordered Chicken Ala King @100/Order"); break; case 'd': d=90; t1++; d=t1*90; System.out.println("You Ordered Chicken Afritada @90/Order"); break; default: System.out.println("Invalid input"); break; } break; case 'B': System.out.println("BEEF"); System.out.println("[A] - Beef Adobo------------------ 75.00/order"); System.out.println("[B] - Beef BBQ-------------------- 75.00/oder"); System.out.println("[C] - Beef Steak-------75.00/order"); System.out.println("[D] - Mechado-------75.00/order"); D++; System.out.print("Input Your Order Here: "); A2 = JJ.next().toLowerCase(); A2char = A2.charAt(0); switch (A2char){ case 'a': a1=75; w2++; a1=w2*75; System.out.println("You Ordered Beef Adobo @75/Order"); break; case 'b': b1=75; e2++; b1=75*e2; System.out.println("You Ordered Beef BBQ @75/Order"); break; case 'c': c1=75; r2++; c1=75*r2; System.out.println("You Ordered Beef Steak @75/Order"); break; case 'd': d1=75; t2++;
  • 3. d1=75*t2; System.out.println("You Ordered Mechado @75/Order"); break; default: System.out.println("Invalid input"); break; } break; case 'C': System.out.println("PORK"); System.out.println("[A] - Pork Adobo------------------ 75.00/order"); System.out.println("[B] - Pork BBQ-------------------- 75.00/oder"); System.out.println("[C] - Ihaw ----------------60.00/order"); D++; System.out.print("Input Your Order Here: "); A2 = JJ.next().toLowerCase(); A2char = A2.charAt(0); switch (A2char){ case 'a': a2=75; w3++; a2=75*w3; System.out.println("You Ordered Pork Adobo @75/Order"); break; case 'b': b2=75; e3++; b2=75*e3; System.out.println("You Ordered Pork BBQ @75/Order"); break; case 'c': c2=60; r3++; c2=60*r3; System.out.println("You Ordered Ihaw @60/Order"); break; default: System.out.println("Invalid input"); break; } break; case 'D': System.out.println("VEGETABLE"); System.out.println("[A] - Pinakbet------------------ 75.00/order"); System.out.println("[B] - Chop Seuy-------------------- 75.00/oder"); System.out.println("[C] - Ginataan-------100.00/order"); System.out.println("[D] - Vegetable Salad------- 90.00/order"); D++; System.out.print("Input Your Order Here: "); A2 = JJ.next().toLowerCase(); A2char = A2.charAt(0); switch (A2char){ case 'a': a3=75; w4++; a3=75*w4; System.out.println("You Ordered Pinakbet @75/Order"); break; case 'b':
  • 4. b3=75; e4++; b3=75*e4; System.out.println("You Ordered ChopSeuy @75/Order"); break; case 'c': c3=75; r4++; c3=75*r4; System.out.println("You Ordered Ginataan @100/Order"); break; case 'd': d3=90; t4++; d3=90*t4; System.out.println("You Ordered Vegetable Salad @90/Order"); break; default: System.out.println("Invalid input"); break; } break; case 'E': System.out.println("FISH"); System.out.println("[A] - Prito------------------ 45.00/order"); System.out.println("[B] - Fish BBQ-------------------- 75.00/oder"); System.out.println("[C] - Paksiw-------80.00/order"); D++; System.out.print("Input Your Order Here: "); A2 = JJ.next().toLowerCase(); A2char = A2.charAt(0); switch (A2char){ case 'a': a4=45; w5++; a4=w5*45; System.out.println("You Ordered Prito @45/Order"); break; case 'b': b4=75; e5++; b4=e5*45; System.out.println("You Ordered Fish BBQ @75/Order"); break; case 'c': c4=80; r5++; c4=80*r5; System.out.println("You Ordered Paksiw @80/Order"); break; default: System.out.println("Invalid input"); break; } break; case 'F': System.out.println("DESSERT"); System.out.println("[A] -Chocolate------------------ 75.00/order"); System.out.println("[B] - Rocky Road-------------------- 75.00/oder"); System.out.println("[C] - Cake -------55.00/order");
  • 5. D++; System.out.print("Input Your Order Here: "); A2 = JJ.next().toLowerCase(); A2char = A2.charAt(0); switch (A2char){ case 'a': a5=75; w6++; a5=75*w6; System.out.println("You Ordered Chocolate @75/Order"); break; case 'b': b5=75; e6++; b5=75*e6; System.out.println("You Ordered Rocky Road @75/Order"); break; case 'c': c5=55; r6++; c5=55*r6; System.out.println("You Ordered cake @55/Order"); break; default: System.out.println("Invalid input"); break; } break; case 'G': System.out.println("DRINKS"); System.out.println("[A] - Orange Juice------------------ 15.00/order"); System.out.println("[B] - Coca Cola----------15.00/oder"); D++; System.out.print("Input Your Order Here: "); A2 = JJ.next().toLowerCase(); A2char = A2.charAt(0); switch (A2char){ case 'a': a6=15; w7++; a6=15*w7; System.out.println("You Ordered Orange Juice @15/Order"); break; case 'b': b6=15; e7++; b6=15*e7; System.out.println("Coca Cola @15/Order"); break; default: System.out.println("Invalid input"); break; } break; default: System.out.println("Invalid input"); break; } System.out.print("Do you want to order Again?(Y/N): "); Try = JJ.next().toLowerCase(); Trychar = Try.charAt(0); A3=a+b+c+d+a1+b1+c1+d1+a2+b2+c2+d2+a3+b3+c3+d3+a4+b4+c4+a5+b5+c5+a6+b6; switch(Trychar){
  • 6. case 'y' : System.out.println("OK! "); break; case 'n' : System.out.println("Thank You! Calculating Your Orders"); break; default : System.out.println("Invalid Input"); System.out.println("Do you want to try again(Y/N)"); Try = JJ.next().toLowerCase(); Trychar = Try.charAt(0); break; } } while (Try2.equalsIgnoreCase("N")){ System.out.print("Type 'D' if Dine-In/Type 'T' if Take-Out: "); A8= JJ.next().toLowerCase(); A8char= A8.charAt(0); switch (A8char){ case 't': System.out.println("Take-Out the Foods!"); break; case 'd': System.out.println("Dine-In the Foods!"); break; default: System.out.println("Invalid Input"); break; } System.out.print("Are You Sure About Your Choice??(Y/N) :"); Try2 = Je.next().toLowerCase(); Trychar2 = Try2.charAt(0); switch(Trychar2){ case 'n' : System.out.println("Lets Choose Again!"); Thread.sleep(1000); break; case 'y' : System.out.println("Lets Continue...."); break; default : System.out.println("Invalid Input"); System.out.println("Do you want to try again(Y/N)"); Try2 = Je.next().toLowerCase(); Trychar2 = Try2.charAt(0); break; } } System.out.println("Total Number Ordered: "+D); System.out.println("Total Amount: P" + A3); System.out.print("Please enter your payment: "); A4=JJ.nextInt(); A5=A4-A3; if (A4<A3){ System.out.println("Invalid Input"); System.out.print("Please enter your payment again: "); A4=JJ.nextInt(); while (A4!=JJ.nextInt()){ System.out.println("Invalid Input"); } } System.out.println("Your Change: "+ A5); System.out.println("You Ordered"); if (a>10){ System.out.println("Adobo------P75.00/order "+ w1+ " Order"); } if (b>10){
  • 7. System.out.println("BBQ------P75.00/order "+ e1+ " Order"); } if (c>10){ System.out.println("Chicken Ala King------P100.00/order "+ r1+ " Order"); } if (d>10){ System.out.println("Chickeen Afritada------P90.00/order "+ t1+ " Order"); } if (a1>10){ System.out.println("Beef Adobo------P75.00/order "+ w2+ " Order"); } if (b1>10){ System.out.println("Beef BBQ------P75.00/order "+ e2+ " Order"); } if (c1>10){ System.out.println("Beef Steak------P75.00/order "+ r2+ " Order"); } if (d1>10){ System.out.println("Mechado------P75.00/order "+ t2+ " Order"); } if (a2>10){ System.out.println("Pork Adobo------P75.00/order "+ w3+ " Order"); } if (b2>10){ System.out.println("Pork BBQ------P75.00/order "+ e3+ " Order"); } if (c2>10){ System.out.println("Inihaw------P60.00/order "+ r3+ " Order"); } if (a3>10){ System.out.println("Pinakbet------P75.00/order "+ w4+ " Order"); } if (b3>10){ System.out.println("ChopSeuy------P75.00/order "+ e4+ " Order"); } if (c3>10){ System.out.println("Ginataan------P100.00/order "+ r4+ " Order"); } if (d3>10){ System.out.println("Vegetable Salad------P90.00/order "+ t4+ " Order"); } if (a4>10){ System.out.println("Prito------P45.00/order "+ w5+ " Order"); } if (b4>10){ System.out.println("Fish BBQ------P75.00/order "+ e5+ " Order"); } if (c4>10){ System.out.println("Paksiw------P80.00/order "+ r5+ " Order"); } if (a5>10){ System.out.println("Chocolate------P75.00/order "+ w6+ " Order"); } if (b5>10){ System.out.println("Rocky Road------P75.00/order " + e6+ " Order"); } if (c5>10){ System.out.println("Cake------P55.00/order " + r6+ " Order"); } if (a6>10){ System.out.println("Orange Juice------P15.00/order "+ w7+ " Order");
  • 8. } if (b6>10){ System.out.println("Coca Cola------P15.00/order "+ e7+ " Order"); } System.out.println(""); if (A8.equals("t")){ System.out.print("Closing Transaction...."); Thread.sleep(1500); System.out.print("."); Thread.sleep(1500); System.out.print("."); Thread.sleep(1500); System.out.print("."); Thread.sleep(1500); System.out.println("."); System.out.print("PRINTING RECEIPT PLEASE WAIT FOR A WHILE..."); Thread.sleep(1500); System.out.print("."); Thread.sleep(1500); System.out.print("."); Thread.sleep(1500); System.out.print("."); Thread.sleep(1500); System.out.println("."); System.out.println(""); System.out.println(""); System.out.println("Cashier Name : Jojo Rojo"); System.out.println("Waiter Name : Vincent Valentine"); System.out.println(""); System.out.println("Transaction Meals for Dine-In"); System.out.println(""); System.out.println("MEAL ORDERED QUANTITY UNIT PRICE TOTAL PRICE"); if (a>10){ System.out.println(" Adobo "+w1+" P75.00 "+a); } if (b>10){ System.out.println(" BBQ "+e1+" P75.00 "+b); } if (c>10){ System.out.println(" Chicken ala king "+r1+" P100.00 "+c); } if (d>10){ System.out.println(" Chicken Afritada "+t1+" P90.00 "+d); } if (a1>10){ System.out.println(" Beef Adobo "+w2+" P75.00 "+a1); } if (b1>10){ System.out.println(" Beef BBQ "+e2+" P75.00 "+b1); } if (c1>10){ System.out.println(" Beef Steak "+r2+" P75.00
  • 9. "+c1); } if (d1>10){ System.out.println(" Mechado "+t2+" P75.00 "+d1); } if (a2>10){ System.out.println(" Pork Adobo "+w3+" P75.00 "+a2); } if (b2>10){ System.out.println(" Pork BBQ "+e3+" P75.00 "+b2); } if (c2>10){ System.out.println(" Inihaw "+r3+" P60.00 "+c2); } if (a3>10){ System.out.println(" Pinakbet "+w4+" P75.00 "+a3); } if (b3>10){ System.out.println(" Chopseuy "+e4+" P75.00 "+b3); } if (c3>10){ System.out.println(" Ginataan "+r4+" P100.00 "+c3); } if (d3>10){ System.out.println(" Vegetable Salad "+t4+" P90.00 "+d3); } if (a4>10){ System.out.println(" Prito "+w5+" P45.00 "+a4); } if (b4>10){ System.out.println(" Fish BBQ "+e5+" P75.00 "+b4); } if (c4>10){ System.out.println(" Paksiw "+r5+" P80.00 "+c4); } if (a5>10){ System.out.println(" Chocolate "+w6+" P75.00 "+a5); } if (b5>10){ System.out.println(" Rocky Road "+e6+" P75.00 "+b5); } if (c5>10){ System.out.println(" Cake "+r6+" P55.00 "+c5); } if (a6>10){ System.out.println(" Orange Juice "+w7+" P15.00 "+a6); } if (b6>10){ System.out.println(" Coca-Cola "+e7+" P15.00
  • 10. "+b6); } System.out.println(""); System.out.println("Total Number Ordered: "+D); System.out.println("Total Amount: P" + A3); System.out.println("Your payment: P"+A4); System.out.println("Your Change: P"+ A5); System.out.println(""); System.out.println(" This serve as your official receipt"); System.out.println(""); System.out.println("For question and comments you may call to 0920- 3858056"); System.out.println(" Please come again!We are happy to serve you!"); return; } if (A8.equals("d")){ System.out.print("Closing Transaction...."); Thread.sleep(1500); System.out.print("."); Thread.sleep(1500); System.out.print("."); Thread.sleep(1500); System.out.print("."); Thread.sleep(1500); System.out.println("."); System.out.print("PRINTING RECEIPT PLEASE WAIT FOR A WHILE..."); Thread.sleep(1500); System.out.print("."); Thread.sleep(1500); System.out.print("."); Thread.sleep(1500); System.out.print("."); Thread.sleep(1500); System.out.println("."); System.out.println(""); System.out.println(""); System.out.println("Cashier Name : Jojo Rojo"); System.out.println("Waiter Name : Vincent Valentine"); System.out.println(""); System.out.println("Transaction Meals for Dine-In"); System.out.println(""); System.out.println("MEAL ORDERED QUANTITY UNIT PRICE TOTAL PRICE"); if (a>10){ System.out.println(" Adobo "+w1+" P75.00 "+a); } if (b>10){ System.out.println(" BBQ "+e1+" P75.00 "+b); } if (c>10){ System.out.println(" Chicken ala king "+r1+" P100.00 "+c); } if (d>10){ System.out.println(" Chicken Afritada "+t1+" P90.00 "+d); } if (a1>10){ System.out.println(" Beef Adobo "+w2+" P75.00 "+a1);
  • 11. } if (b1>10){ System.out.println(" Beef BBQ "+e2+" P75.00 "+b1); } if (c1>10){ System.out.println(" Beef Steak "+r2+" P75.00 "+c1); } if (d1>10){ System.out.println(" Mechado "+t2+" P75.00 "+d1); } if (a2>10){ System.out.println(" Pork Adobo "+w3+" P75.00 "+a2); } if (b2>10){ System.out.println(" Pork BBQ "+e3+" P75.00 "+b2); } if (c2>10){ System.out.println(" Inihaw "+r3+" P60.00 "+c2); } if (a3>10){ System.out.println(" Pinakbet "+w4+" P75.00 "+a3); } if (b3>10){ System.out.println(" Chopseuy "+e4+" P75.00 "+b3); } if (c3>10){ System.out.println(" Ginataan "+r4+" P100.00 "+c3); } if (d3>10){ System.out.println(" Vegetable Salad "+t4+" P90.00 "+d3); } if (a4>10){ System.out.println(" Prito "+w5+" P45.00 "+a4); } if (b4>10){ System.out.println(" Fish BBQ "+e5+" P75.00 "+b4); } if (c4>10){ System.out.println(" Paksiw "+r5+" P80.00 "+c4); } if (a5>10){ System.out.println(" Chocolate "+w6+" P75.00 "+a5); } if (b5>10){ System.out.println(" Rocky Road "+e6+" P75.00 "+b5); } if (c5>10){ System.out.println(" Cake "+r6+" P55.00 "+c5);
  • 12. } if (a6>10){ System.out.println(" Orange Juice "+w7+" P15.00 "+a6); } if (b6>10){ System.out.println(" Coca-Cola "+e7+" P15.00 "+b6); } System.out.println(""); System.out.println("Total Number Ordered: "+D); System.out.println("Total Amount: P" + A3); System.out.println("Your payment: P"+A4); System.out.println("Your Change: P"+ A5); System.out.println(""); System.out.println(" This serve as your official receipt"); System.out.println(""); System.out.println("For question and comments you may call to 0920- 3858056"); System.out.println(" Please come again!We are happy to serve you!"); return; } } }