import java.lang.*; import java.io.*; import javax.swing.*; public class joy { public static void main(String[]args)throws IOException { BufferedReader bb= new BufferedReader(new InputStreamReader(System.in)); String go, fight, win, ha; double pls, naman, run, ka; System.out.println("\tA. Student Meal"); System.out.println("\tB. Employee Meal"); System.out.println("\tC. Party Order"); System.out.println("Choice:"); choice(char); switch(choice) { case 'A':case 'a': int choices1; System.out.println("1. Ambula.........35.00p"); System.out.println("2. Order............45.00p"); System.out.println("3. Group Meal...150.00p"); ha=JOptionPane.showInputDialog(null, "Enter Your Order: "); choices1=Integer.parseInt(ha); switch(choices1) { case 1: fight= JOptionPane.showInputDialog(null, "Piece(s) of Order"); namanouble.parseDouble(fight); pls=35*naman; JOptionPane.showMessageDialog(null,"Total Charge: " +pls); win= JOptionPane.showInputDialog(null, "Money Received"); runouble.parseDouble(win); ka=run-pls; JOptionPane.showMessageDialog(null,"Change: " +ka); System.exit(0); break; case 2: fight= JOptionPane.showInputDialog(null, "Piece(s) of Order"); namanouble.parseDouble(fight); pls=45*hah; JOptionPane.showMessageDialog(null,"Total Charge: " +pls); win= JOptionPane.showInputDialog(null, "Money Received"); runouble.parseDouble(win); ka=run-pls; JOptionPane.showMessageDialog(null,"Change: " +ka); System.exit(0); break; case 3: fight= JOptionPane.showInputDialog(null, "Piece(s) of Order"); namanouble.parseDouble(fight); pls=150*naman; JOptionPane.showMessageDialog(null,"Total Charge: " +pls); win= JOptionPane.showInputDialog(null, "Money Received"); runouble.parseDouble(win); ka=run-pls; JOptionPane.showMessageDialog(null,"Change: " +ka); System.exit(0); break; } case 'B':case 'b': int choices2; System.out.println("1. Order.............Php100.00"); System.out.println("2. Group Meal....Php200.00"); ha=JOptionPane.showInputDialog(null, "Enter Your Order: "); choices2=Integer.parseInt(ha); switch(choices2) { case 1: fight= JOptionPane.showInputDialog(null, "Piece(s) of Order"); namanouble.parseDouble(fight); pls=100*naman; JOptionPane.showMessageDialog(null,"Total Charge: " +pls); win= JOptionPane.showInputDialog(null, "Money Received"); runouble.parseDouble(win); ka=run-pls; JOptionPane.showMessageDialog(null,"Change: " +ka); System.exit(0); break; case 2: fight= JOptionPane.showInputDialog(null, "Piece(s) of Order"); hahouble.parseDouble(fight); pls=200*naman; JOptionPane.showMessageDialog(null,"Total Charge: " +pls); win= JOptionPane.showInputDialog(null, "Money Received"); helpouble.parseDouble(win); ka=run-pls; JOptionPane.showMessageDialog(null,"Change: " +ka); System.exit(0); break; } case 'C':case 'c': int choices3; System.out.println("1. Buffet.............Php1500.00"); System.out.println("2. Bucket Meal....Php700.00"); ha=JOptionPane.showInputDialog(null, "Enter Your Order: "); choices3=Integer.parseInt(ha); switch(choices3) { case 1: fight= JOptionPane.showInputDialog(null, "Piece(s) of Order"); hahouble.parseDouble(fight); pls=1500*naman; JOptionPane.showMessageDialog(null,"Total Charge: " +pls); win= JOptionPane.showInputDialog(null, "Money Received"); helpouble.parseDouble(win); ka=run-pls; JOptionPane.showMessageDialog(null,"Change: " +ka); System.exit(0); break; case 2: fight= JOptionPane.showInputDialog(null, "Piece(s) of Order"); hahouble.parseDouble(fight); pls=700*naman; JOptionPane.showMessageDialog(null,"Total Charge: " +pls); win= JOptionPane.showInputDialog(null, "Money Received"); helpouble.parseDouble(win); ka=run-pls; JOptionPane.showMessageDialog(null,"Change: " +ka); System.exit(0); break; } } { Default:System.out.println("\tInvalid Input"); System.exit(0); } } }