Write a Java Program to place a pizza ordering program. It creates a pizza ordered to the
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 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
Name the program, PizzaOrder.java
Write a welcome message that said, “Welcome to ___________________ Pizza.”
Ask the user to input his or her first name. “Enter your first name:”
A menu should display to the user:
Pizza sizes (inches) Cost 10” $10.99 12” $12.99 14” $14.99 16” $16.99
What size pizza would you like? 10, 12, 14, or 16 (enter the number only):
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):”
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):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):
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.
Accounting Information Systems
ISBN: 978-0133428537
13th edition
Authors: Marshall B. Romney, Paul J. Steinbart