Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Client {
- public static void main(String[] args) {
- Scanner sc = new Scanner(System.in);
- System.out.println("Press 1 to order a Chicken Pizza");
- System.out.println("Press 2 to order a Paneer Pizza");
- System.out.println("Press 3 to order a Corn Pizza");
- System.out.print("Enter your choice: ");
- int choice = sc.nextInt();
- switch(choice){
- case 1:
- PizzaStore.orderPizza("Chicken Pizza");
- System.out.println("Pizza delivered!");
- break;
- case 2:
- PizzaStore.orderPizza("Paneer Pizza");
- System.out.println("Pizza delivered!");
- break;
- case 3:
- PizzaStore.orderPizza("Corn Pizza");
- System.out.println("Pizza delivered!");
- break;
- default:
- System.out.println("Sorry, we don't have that type here!");
- }
- }
- }
Add Comment
Please, Sign In to add comment