Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using C++ ... For this lab you will need to create a console application that will implement the final changes to the business rules for

Using C++ ...

image text in transcribed

For this lab you will need to create a console application that will implement the final changes to the business rules for the Pizzeria. This version of the application will continue to accept a diameter for slice area calculation until the user ends the program. That is, the user can enter a diameter, view results, then enter another diameter and view results and then continue on until they choose to end the program by entering '0' for a diameter. The second significant change is that pizzas may be cut into up to 8, 12, 16, 20 or 24 slices dependent on the pizza size. Again, the application should prompt for entry of a diameter and only process and display results if the entered diameter is in the range of 12" to 36" inclusive When a bad diameter is entered, (other than 0 to end) display a message and re-prompt for entry of a valid diameter. Prompt the user to enter the diameter of a pizza in inches. Pizza diameters can be entered as real numbers. This value is used later to determine the maximum number of slices to cut that pizza into. When the user does enter '0' for diameter, immediately end the program without any further processing, message or prompt. Check that the diameter entered is within the range of 12" to 36" inclusive. If the diameter is outside of that range and not '0', display an error message and re-prompt for a valid entry. Do not allow any processing to continue with an entry of a diameter outside of the allowable range. When the diameter entered is good, calculate the area of the pizza then determine the maximum number of slices the pizza can be cut into based on the following: Diameters of 12" up to and including 20" can only be cut in eight slices. Diameters larger than 20" up to and including 24" can be cut into a maximum of 12 slices. Diameters larger than 24" up to and including 30" can be cut into a maximum of 16 slices. Diameters larger than 30" can be cut into a maximum of 24 slices. Create output formatted as shown in the example below showing the list of all possible cutting configurations for that pizza indicating the number of slices and the slice area for each configuration. Match the sample output as closely as possible. Continue to prompt for entry of pizza diameters with a message to enter '0' to end the program and display results lists for each entered diameter. Clear the console using system("c1s") prior to displaying a new list each time

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

Step: 3

blur-text-image

Ace Your Homework with AI

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

Get Started

Recommended Textbook for

How Do I Use A Database Research Tools You Can Use

Authors: Laura La Bella

1st Edition

1622753763, 978-1622753765

More Books

Students also viewed these Databases questions

Question

How is social networking used in informal training?

Answered: 1 week ago

Question

1. Signs and symbols of the map Briefly by box ?

Answered: 1 week ago

Question

Types of physical Maps?

Answered: 1 week ago

Question

Explain Intermediate term financing in detail.

Answered: 1 week ago

Question

Types of cultural maps ?

Answered: 1 week ago

Question

How do we organise for international logistics?

Answered: 1 week ago