Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

class circle { public: void print ( ) const; void setRadius ( double ) ; void setCenter ( double , double ) ; void getCenter

class circle
{
public:
void print () const;
void setRadius (double);
void setCenter (double, double);
void getCenter (double&, double&);
double getRadius ();
double area ();
circle ();
circle (double, double, double);
private:
double xCoordinate;
double yCoordinate;
double radius;
};
class cylinder: public circle
{
public:
void print () const;
void setHeight (double);
double getHeight ();
double volume();
double area ();
cylinder ();
cylinder (double, double, double, double);
private:
double height;
}; Cylinder.print() const
{
cout <<"x-coordinate: "<<_____________<< endl;
cout <<"y-coordinate: "<<_____________<< endl;
cout << "radius: "<<_____________<< endl;
}
______________setRadius(________ r)
{
if (r >=0)
______________;
else
radius =0.0;
}
______________setCenter(________ x,________ y)
{
if (x >=0)
________________;
else
xCoordinate =0.0;
if (y >=0)
________________;
else
yCoordinate =0.0;
}
______________getCenter(________ x,________ y)
{
x =________________;
y =________________;
}
______________getRadius()
{
return ________________;
}
______________area()
{
return 3.1416*______________;
}
______________circle()
{
_____________=0.0;
_____________=0.0;
_____________=0.0;
}
______________circle(________ x,________ y,________ r)
{
__________(x, y);
__________(r);
}
______________print() const
{
circle._________;
cout << "height: "<<__________<< endl;
}
______________setHeight(________ h)
{
if (h >=0)
_______________;
else
height =0.0;
}
______________getHeight()
{
return ___________;
}
______________volume()
{
return ______________* height;
}
______________area()
{
return 2*_____________+2*3.1416*___________* height;
}
______________cylinder()
{
height =0.0;
}
______________cylinder(________ x,________ y,________ r,________ h)
__________(x, y, r);
{
setHeight(h);
}

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_2

Step: 3

blur-text-image_3

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

Linked Data A Geographic Perspective

Authors: Glen Hart, Catherine Dolbear

1st Edition

1000218910, 9781000218916

More Books

Students also viewed these Databases questions

Question

What is Accounting?

Answered: 1 week ago

Question

Define organisation chart

Answered: 1 week ago

Question

What are the advantages of planning ?

Answered: 1 week ago