Question: Write a Java Program to place a pizza ordering program. It creates a pizza ordered to the specifications that the user desires. It walks the

Write a Java Program to place a pizza ordering program. It creates a pizza ordered to the specifications that the user desires. It walks the user through ordering, giving the user choices, which the program then uses to decide how to make the pizza and how much the cost of the pizza will be.

Note: Use dialog boxes for communicating with the user. Remember to use the JOptionPane class which is the graphical user interface (GUI) and Comments that are not read by the computer, they are for use by the programmer. They are to help a programmer document what the program does and how it accomplishes it. This is important when a programmer needs to modify code that is written by another person.

Task

  1. Name the program, PizzaOrder.java

  2. Write a welcome message that said, “Welcome to ___________________ Pizza.”

  3. Ask the user to input his or her first name. “Enter your first name:”

  4. A menu should display to the user:

    Pizza sizes (inches) Cost                                                                                                                                                                                                                                     10”  $10.99      12”  $12.99       14” $14.99     16” $16.99

  5. What size pizza would you like? 10, 12, 14, or 16 (enter the number only):

  6. After the user has inputted the number another print statement should ask
    “What type of crust do you want? (H)Hand-tossed, (T) Thin-crust, or (D) Deep-

    dish (enter H, T, or D):”

  7. After the user has inputted the type of crust another print statement asking

    All pizzas come with cheese.
    Additional toppings are $1.25 each, choose from: Pepperoni, Sausage, Onion, Mushroom
    Do you want Pepperoni? (Y/N):

  8. After you inputted Yes, or No another question should pop up Do you want Sausage? (Y/N): then Do you want Onion? (Y/N): then Do you want Mushroom? (Y/N):

  9. In the end, it should show a receipt depending on the input: (below is an example)

    Your order is as follows: 10-inch pizza Hand-tossed crust Cheese

    The cost of your order is: $12.990000
    The tax is: $1.039200
    The total due is: $14.029200
    Your order will be ready for pick up in 30 minutes.

Step by Step Solution

3.36 Rating (159 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Heres a basic Java program using JOptionPane for a pizza ordering system import javaxswingJOptionPane public class PizzaOrder public static void mainS... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!