asked 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.

asked
User BryceH
by
8.9k 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?

answered
User James Clark
by
8.1k points

No related questions found

Welcome to Qamnty — a place to ask, share, and grow together. Join our community and get real answers from real people.