Answered step by step
Verified Expert Solution
Question
1 Approved Answer
If I enter blank or nothing for fill color it is not asking again to enter. Am I missing something with the code below? The
If I enter blank or nothing for fill color it is not asking again to enter. Am I missing something with the code below? The radius portion works just fine.
int main
std::cout Lab Class Creation std::endl;
int radius;
Circle circle;
do
do
std::cout "Radius of Circle as a positive number to exit: ;
std::cin radius;
if radius
return ;
circle.setRadiusradius;
while circlegetRadius radius; Keep asking until valid radius is entered
std::string color;
do
std::cout "Fill Color of Circle blank not allowed: ;
std::cin color;
circle.setColorFillcolor;
while circlegetColorFill color; Keep asking until valid color is entered
displayCircleInfocircle;
Pause for the user to read the displayed information
systempause;
while true;
return ;
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