Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

can i have help with the menu selection after 'a'? the prices are as follows: final double CHEESE_COST = 0.0272; final double SAUCE_COST = 0.0316;

can i have help with the menu selection after 'a'?

the prices are as follows:

final double CHEESE_COST = 0.0272;

final double SAUCE_COST = 0.0316;

final double DOUGH_COST = 0.0228;

final double TOPPING_COST = 0.0284;

image text in transcribed

Sample interaction (User input in bold):

Welcome to Adkins Pizzeria!

Can I have your name please?

Wilson the Volleyball

Ok, let's start your order, Wilson the Volleyball.

Here is what you can do next:

MENU

a - Add a pizza

t - Print the total

r - Read the order

q - Quit

Please make a selection:

t

Total $0.00.

Here is what you can do next:

MENU

a - Add a pizza

t - Print the total

r - Read the order

q - Quit

Please make a selection:

r

You have not ordered any pizzas yet.

Here is what you can do next:

MENU

a - Add a pizza

t - Print the total

r - Read the order

q - Quit

Please make a selection:

a

What would you like to name pizza number 1?

Hawaiian

What size would you like Hawaiian to be?

We can handle pizzas between 8 and 48 inches.

12

How many toppings would you like on this pizza?

You can have between 0-8 toppings.

2

What topping would you like?

Your options are: Pepperoni, Mushroom, Chicken, Ham, Pineapple, Sausage, Basil, Olive.

Ham

Chosen topping Ham added.

What topping would you like?

Your options are: Pepperoni, Mushroom, Chicken, Ham, Pineapple, Sausage, Basil, Olive.

Pineapple

Chosen topping Pineapple added.

You have ordered Hawaiian with toppings:

Ham, Pineapple.

This pizza costs: $6.42.

Here is what you can do next:

MENU

a - Add a pizza

t - Print the total

r - Read the order

q - Quit

Please make a selection:

t

Total $15.65.

Here is what you can do next:

MENU

a - Add a pizza

t - Print the total

r - Read the order

q - Quit

Please make a selection:

r

You ordered the following pizzas:

Hawaiian

Ok, Wilson the Volleyball your total for your 1 pizza will come out to $15.65.

Here is what you can do next:

MENU

a - Add a pizza

t - Print the total

r - Read the order

q - Quit

Please make a selection:

a

What would you like to name pizza number 2?

Original

What size would you like Original to be?

We can handle pizzas between 8 and 48 inches.

22

How many toppings would you like on this pizza?

You can have between 0-8 toppings.

9

Please choose a number of toppings between 0 and 8.

-1

Please choose a number of toppings between 0 and 8.

1

What topping would you like?

Your options are: Pepperoni, Mushroom, Chicken, Ham, Pineapple, Sausage, Basil, Olive.

pepperoni

Chosen topping pepperoni added.

You have ordered Original with toppings:

pepperoni.

This pizza costs: $10.80.

Here is what you can do next:

MENU

a - Add a pizza

t - Print the total

r - Read the order

q - Quit

Please make a selection:

r

You ordered the following pizzas:

Hawaiian, Original

Ok, Wilson the Volleyball your total for your 2 pizzas will come out to $57.47.

Here is what you can do next:

MENU

a - Add a pizza

t - Print the total

r - Read the order

q - Quit

Please make a selection:

q

JAVA PLS

inch (0.0284). 3. Implement a selection menu of what a user can possibly do after being introduced to the Pizzeria. After each action the user takes and completes, prompt them again with the menu. Below is the list of options your program must have implemented: a. a - Add a pizza i. Creates a pizza b. t-Print the total i. Prints out the current total cost of the user's order c. r-Read the order i. Prints out the ordered pizza names ii. Prints out the total number of ordered pizzas and the total cost of the pizza order. d. q - Quit i. Exits the program immediately 4. Here is the process of adding a pizza (Option a): a. Provide the number of the current pizza and ask for its name. b. Ask for the size of the pizza. c. Ask for (and validate) the number of toppings the user would like. i. We can only have up to 8 toppings per pizza. ii. We can have duplicate toppings. d. Ask for (and validate) each topping the user would like. e. Summarize the user's pizza by printing its name, toppings, and total cost. i. What variables might you need to create to do this? f. If the user does not have any toppings, use the following print statement replacing pizzaName: You have ordered pizzaName with no toppings. g. Update any relevant variables for printing the total (t) and reading the user's order (r)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image
Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students explore these related Databases questions

Question

Convert 562 mmHg to atm.

Answered: 3 weeks ago