Answered step by step
Verified Expert Solution
Question
1 Approved Answer
We are going to use psuedocode to code an application used to purchase pizza. This program will assess your ability to get input and print
We are going to use psuedocode to code an application used to purchase pizza. This program will assess your ability to
get input and print output, use loops and decision structures, and perform basic calculations. The exam covers Chapters
Please ensure you include your IPO chart.
To start, display a welcome message: Welcome to Pizza Planet!
You will prompt the user to enter their name.
You will then ask the user how many pizzas they would like to order
A while loop will be used, to validate the number of pizzas is between If the user inputs a number less than zero or
greater than the following error message will display.
Invalid Input. You must order between and pizzas
Once you get a valid number for the number of pizzas ordered you will continue with the program
Let the user know if they purchase four or more pizzas, they will receive a discount on their total order.
If you order or more pizzas, you'll receive a discount of
Assume the pizza sizes are the same for everyone.
Menu shown below:
Enter C for Cheese
Enter P for Pepperoni
Enter S for Supreme
Enter V for Veggie
With a while loop, validate the pizza codes to ensure that they are either C P S or V If they choose any other option
than C P S or V display a message like the one below and allow them to input the pizza choices again:
Welcome to Pizza Planet
Enter your full name
Bob
How many pizzas would you like to order? If you order or more pizzas,
you'll receive a discount of You must order between and pizzas
Please enter the type of pizza that you want to order:
Enter C for Cheese
Enter P for Pepperoni
Enter S for Supreme
Enter V for Veggie
Enter selection for pizza #
d
Incorrect Pizza Option. Please Try Again for Pizza #
c
Enter selection for pizza #
p
Here is your order confirmation
Name Bob
Number of Pizzas Purchased
Discount
Subtotal
Grand Total
When a user adds a pizza to their order, count the pizzas and have a running total.
Welcome to Pizza Planet!
Enter your name
Bob
How many pizzas would you like to order? If you order or more pizzas,
you'll receive a discount of You must order between and pizzas
Invalid Input. You must order between and pizzas
Invalid Input. You must order between and pizzas
Please enter the type of pizza that you want to order:
Enter C for Cheese
Enter P for Pepperoni
Enter S for Supreme
Enter V for Veggie
Enter selection for pizza #
C
Here is your order confirmation
Name Bob
Number of Pizzas Purchased
Discount
Subtotal
Grand Total
Enter selection for pizza #
P
Here is your order confirmation
Name Bob
Number of Pizzas Purchased
Discount
Subtotal
Grand Total
Enter selection for pizza #
P
Here is your order confirmation
Name Bob
Number of Pizzas Purchased
Discount
Subtotal
Grand Total
Welcome to Pizza Planet!
Enter your name
Sarah
How many pizzas would you like to order? If you order or more pizzas,
you'll receive a discount of You must order between and pizzas
Please enter the type of pizza that you want to order:
Enter C for Cheese
Enter P for Pepperoni
Enter S for Supreme
Enter V for Veggie
Enter selection for pizza #
C
Here is your order confirmation
Name Sarah
Number of Pizzas Purchased
Discount
Subtotal
Grand Total
Enter selection for pizza #
p
Here is your order confirmation
Name Sarah
Number of Pizzas Purchased
Discount
Subtotal
Grand Total
Enter selection for pizza #
s
Here is your order confirmation
Name Sarah
Number of Pizzas Purchased
Discount
Subtotal
Grand Total
Enter selection for pizza #
v
Here is your order confirmation
Name Sarah
Number of Pizzas Purchased
Discount
Subtotal
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started