Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Problem coverage: 0 % Your problem setup does not appear to be consistent with the assignment. For this assignment, the proportion of the problem that
Problem coverage:
Your problem setup does not appear to be consistent with the assignment.
For this assignment, the proportion of the problem that is covered by your solution is being assessed by running a suite of reference tests against your solution.
In this case, none of the reference tests pass on your solution, which may mean that your solution and your tests make incorrect assumptions about some aspect of the required behavior. This discrepancy prevented WebCAT from properly assessing the thoroughness of your solution or your test cases.
Double check that you have carefully followed all initial conditions requested in the assignment in setting up your solution.
The following hints may help you locate some ways in which your solution may be improved:
The coneCalc method did not produce the correct lateral surface area output for radius and height occurrences
Your program did not process data for multiple cones.
Your program did not process data for multiple cones using an uppercase Y ALSO READ Program Behavior
The program will repeatedly process the dimensions of a cone and produce various results. For each cone, it prompt the user to enter the cone's radius and height. It will then calculate and print the lateral surface area, total surface area, and volume of the cone. The lateral surface area is the surface of the cone without the base and the total surface area includes the base.
Here is a sample run of the program. User input is shown in blue.
Welcome to Cone Calculator!
Enter the radius:
Enter the height:
Lateral surface area:
Total surface area:
Volume:
Process another cone y or n y
Enter the radius:
Enter the height:
Lateral surface area:
Total surface area:
Volume:
Process another cone y or n Y
Enter the radius:
Enter the height:
Error: The radius and height must both be greater than
Please reenter.
Enter the radius:
Enter the height:
Lateral surface area:
Total surface area:
Volume:
Process another cone y or n n
Thanks for using Cone Calculator!
Make sure your prompts and output conform to the example above, including blank lines in the output. Use printf statements to output the lateral surface area to places past the decimal point, the total surface area to places, and the volume to places.
Note that the input are both floatingpoint values.
You can assume that the user will enter numeric data for the radius and height, but you will validate the numbers. If either input value is or less, print an error message as shown above and reread both values. Do not calculate cone values area volume for invalid input.
When determining whether the user wants to process another cone, an input value of y or Y should be interpreted as yes. Any other input string should be interpreted as a no
You'll need to read consume and throw away the newline character after the height is input BEFORE reading the string that determines whether the user wants to process another cone. If you don't, that question will be answered by the newline and interpreted as a negative response.
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