thespeedracer38

Client

Apr 10th, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.01 KB | None | 0 0
  1. import java.util.Scanner;
  2. public class Client {
  3.     public static void main(String[] args) {
  4.         Scanner sc = new Scanner(System.in);
  5.         System.out.println("Press 1 to order a Chicken Pizza");
  6.         System.out.println("Press 2 to order a Paneer Pizza");
  7.         System.out.println("Press 3 to order a Corn Pizza");
  8.         System.out.print("Enter your choice: ");
  9.         int choice = sc.nextInt();
  10.         switch(choice){
  11.             case 1:
  12.                 PizzaStore.orderPizza("Chicken Pizza");
  13.                 System.out.println("Pizza delivered!");
  14.                 break;
  15.             case 2:
  16.                 PizzaStore.orderPizza("Paneer Pizza");
  17.                 System.out.println("Pizza delivered!");
  18.                 break;
  19.             case 3:
  20.                 PizzaStore.orderPizza("Corn Pizza");
  21.                 System.out.println("Pizza delivered!");
  22.                 break;
  23.             default:
  24.                 System.out.println("Sorry, we don't have that type here!");
  25.         }
  26.     }
  27. }
Add Comment
Please, Sign In to add comment