Question: implement all the methods in the circle class replace all the comments in the main method with the right call of a method #include #include

implement all the methods in the circle class

replace all the comments in the main method with the right call of a method

#include

#include

using namespace::std;

class circle {

public:

void setX( double xV );

void setY( double yV );

void setR( double rV);

void set(double value, char whichOne); // use 'x' for x, use 'y' for y

// and use 'r' for radius

double getX(void) const;

double getY(void) const;

double getR(void) const;

double get(char whichOne) const; // use 'x' for x, use 'y' for y

// and use 'r' for radius

void print(ostream & w) const;

double area(void) const;

void input(void);

circle move( double xC, double yC) const; // return a circle formed from

// the invoking instance by:

// keep the same radius, adjust the x and y

// of the center by the xC and yC amounts

circle reSize(double rC) const; // return a circle formed from

// the invoking instance by:

// keep the same center

// adjust the radius by rC

private:

double x,

y,

radius;

};

// The following is NOT a member function

circle makeCircle(double xV, double yV, double rV);

void main()

{

circle a;

// test input and print using a

// test the area function using a

// add 2.4 to the x value of the circle a - use print to show the answer

// test makeCircle, move and reSize - use print to show the answers

// using input create a circle named one

// using set create a circle named two

// using setX, setY, and setR create a circle named three

// Use of function chaining

// starting with center of x = 2.3, y = 4.5 and radius = 8.2

// move the circle by adjusting x by 1.1 and y by 3.3

// then resize the circle by adding 5.5 to the radius

// print the resulting circle

return;

}

circle makeCircle(double xV, double yV, double rV) {

// Write the body here

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!