CPT 232—C++ PROGRAMMING I Program #4
#4 CPT 232—C++ PROGRAMMING I Program #4 Due Date: _________________ PROGRAM DESCRIPTION Those pesky town officials are tough to please! And that means the design for Summerville SeaWorld™ is gonna take longer than expected. The town council is still a bit cranky over our plan to use so much water in a commercial enterprise. (Haven’t they heard of Lakes Marion and Moultrie?!) So, the principal feature of the park, the proposed porpoise pond (just had to say that for a bit of alliteration), is about to undergo some redesigning. Now, we will be informed as to the maximum amount of water we can use in the tank, after a possibly touchy town discussion scheduled at the next fortnightly meeting. (Wonder how often that really is? ) But we can’t afford to wait around without lining up some contractors to start making preparations for the tank’s support. So, what’s needed now is for you to revise the program you wrote and take the tank’s size in gallons as input, then plan the rest around that. The program will surely be done long before we have the final word, but we can use the program as an estimator for various options, cost figures, etc. SPECIFIC DIRECTIONS This time, your program must have an introduction that explains to the user how the program works and how to respond to your prompts—for example, what units of measure to use. But now you will be planning “backwards” from the original calculations. Ask for the user’s name—that’s always a good thing to do—and then ask for the volume of water for the tank in gallons. Once you have that, you are ready to convert it to an appropriate cubic measure. As before, assume we will fill the tank to the 11-foot level. Now, you can use the cylinder formula “in reverse” and calculate the radius of the proposed porpoise pond. (Sorry, that’s the last time I’ll do that!)
0 comments:
Post a Comment