I'm trying to make this program to ask for this:
whenever either "o" 's is doneSystem.out.println("Please choose an option:\n" + " 1) Update Pizza Order\n" + " 2) Update Cherry Pie Order\n" + " 3) Update Charm Order\n" + " 4) Check out"); o = inScan.nextInt();
/* This is a program for a small shop called Pies, Pies and Pis. The shop sells pizza pies, cherry pies and gold pi charms. */ import java.util.Scanner; public class asgmt { public static void main (String [] args) { int x , y, o, p, pp, cps, pico, co; Scanner inScan = new Scanner(System.in); System.out.println("Welcome to Pies, Pies and Pis"); System.out.println("Is there a customer in line? (1 = yes, 2 = no)"); x = inScan.nextInt(); if(x == 1){ System.out.println("Are you a Pie card member? (1 = yes, 2 = no)"); y = inScan.nextInt(); if(y == 1){ System.out.println("Welcome Back, Pie Card holder!:\n" + "You will receive:\n" + " Pepperoni pizza for the price of plain\n" + " $0.25 off a slice of cherry pie\n" + " $2.00 off a whole cherry pie\n" + " $10.00% off each Pi charm"); } System.out.println("Please choose an option:\n" + " 1) Update Pizza Order\n" + " 2) Update Cherry Pie Order\n" + " 3) Update Charm Order\n" + " 4) Check out"); o = inScan.nextInt(); if(o == 1){ System.out.println("Here is your current order:\n" + " No pizzas ordered"); System.out.println("How many plain pizzas would you like for $10.00 each?"); p = inScan.nextInt(); System.out.println("How many pepperoni pizzas would you like for $12.00 each?"); pp = inScan.nextInt(); } if(o == 2){ System.out.println("Here is your current order:\n" + " No cherry pie slices ordered"); System.out.println("How many cherry pie slices would you like for:\n" + " $2.00 per slice\n" +" $10.00 per pie (6 slices)"); cps = inScan.nextInt(); } if(o == 3){ System.out.println("Here is your current order:\n" + "No gold Pi charm ordered"); System.out.println("How many Pi charms would you like for $50.00 each?"); pico = inScan.nextInt(); } if(o == 4){ System.out.println("Here is your subtotal:\n\n" + " No items purchased! Thanks anyway for stopping!"); co = inScan.nextInt(); } } } }