Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the following computer program: A helium balloon seller wishes to have a computer program to help with her business. When someone makes a purchase,

Consider the following computer program:
A helium balloon seller wishes to have a computer program to help with her business. When someone makes a purchase, they buy spherical balloons all of the same size, and she needs to know the total volume of helium needed to inflate them all. 2 items are entered into the program - the radius of a spherical balloon (must include decimals so you can have radii like 2.5, or 10.5, or 16.75- as well as 5 or 9, for examples) and number of balloons bought. Then, your program should calculate the volume of ONE balloon. You will have to find a formula for the volume of a sphere to do this. Save the answer in a processing variable. Then, the total volume of all balloons needs to be calculated. This is easy since you know the volume of one balloon and you also know the number of balloons. This total volume of all balloons (which is the amount of gas needed) is then displayed, and that's all that is displayed, and then program stops.
Notes:
* You will find that the quantity "PI" is involved. That is a constant, and should be noted as a processing variable.
* This program has 2 inputs, 2 processing variables, and 1 output. Use short, descriptive variable names with no spaces in them now, as you are looking forward to C++ coding soon.
* Remember that a variable is either input, processing or output - can't be more than one type, so - be sure any variable is only listed in ONE category.
* To check your work, suppose someone buys 6 balloons, and the radius of each is 9 inches. The total volume is 18312.5 cubic inches.
2. Write up an IPO chart for this problem. Please remember that the "Processing Variables" area is NOT done the way it is in your book. Save the action steps for the Algorithm section. The Processing section for the purposes of your hands-on work is just to be Processing Variables, as you see in the Instructor Comments.
3. Desk-check your solution. Go through it slowly, step by step. This is the only way to insure it works. If it doesn't, you must fix it.
* You will never hand in your desk check but skipping it is dangerous!

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

Probabilistic Databases

Authors: Dan Suciu, Dan Olteanu, Christopher Re, Christoph Koch

1st Edition

3031007514, 978-3031007514

More Books

Students also viewed these Databases questions