I've been given an assignment to write code for a sphere class. Now the point of this lesson is really formatting I/O, so they've given some member functions for the class. The problem is I don't know what they are all for. I've included them below and what I think they are supposed to do, so clue me in if I'm wrong.
sphere(); //default constructor
sphere(int inradius); //parameterized constructor or function for inputting radius
void setradius(int newradius); //new sphere object
int getradius(); // getter for the radius private data member
and then the rest are just calculation member functions for volume, diameter, and such.
If I'm right, I'm not sure how I call the first object in main and then replace it with a new instance of the object with a different radius value (The values are supposed to be 20 through 30 without creating an array of sphere objects)