223k views
1 vote
In C++

Write a simple program to test your Circle class. The program must call every member function at least once. The program can do anything of your choice.

User BryceH
by
8.3k points

1 Answer

5 votes

Answer:

int main() {

Circle* pCircle = new Circle(5.0f, 2, 3);

pCircle->up();

pCircle->down();

pCircle->left();

pCircle->right();

cout << "X: " << pCircle->getx() << endl;

cout << "Y: " << pCircle->gety() << endl;

cout << "Radius: " << pCircle->getRadius() << endl;

pCircle->print();

pCircle->update_radius(4.0f);

if (pCircle->isUnit()) {

cout << "is unit" << endl;

}

pCircle->move_x(10);

pCircle->move_y(10);

}

Step-by-step explanation:

something like that?

User James Clark
by
7.5k points