Question
THE PICTURE IS THE MAKE UP LAB 3 REFERRED TO IN THE DESCRIPTION , AND THE DESCRIPTION IS WHAT WE HAVE TO CHANGE ABOUT MAKE
THE PICTURE IS THE MAKE UP LAB 3 REFERRED TO IN THE DESCRIPTION , AND THE DESCRIPTION IS WHAT WE HAVE TO CHANGE ABOUT MAKE UP LAB USE C++
In Labs 1 - 3 Makeup,, you were required to write 6 while loops to check input for dimensions of 3 - dimensional objects.. For this lab,, you should redo Labs 1 - 3 makeup with function calls replacing the while loops to check dimensions and write a fun ction to check the validity.. ( I have posted a possible sol ution for Labs 1 - 3 makeup that you can use if you did not do Labs 1 - 3 makeup . Review this possible solution,, fix any errors,, then make the changes for this lab..)
The new function that you add to check the validity should accept two parameters:: one a doub le and one a string.. You should send the dimension that is being checked to the double parameter and a description of what that dimension stands for (ee..gg.. rradius of sphere,, hheight of box,, etc..)) to the string parameter.. The function should employ a si ngle while loop to check the validity of dimension and prompt the user to re - enter the dimension when it is wrong.. There should not be any selection structures in this function.. Your error message should what dimension is wrong be similar to
The length of the box cannot be less than zero.. Please enter the length of the box again..
You should only have one function other than main.. Do not use and string objects to store the descriptions of the dimensions,, rather send a literal constant to the function
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