SPHERE.H
But, unlike a struct, a class can have member functions associated directly with it. Member functions are accessed in a manner similiar to a struct member by using a dot. Member functions cannot be accessed by others unless they are declared as public.
class sphere
{
public:
void setRadius(float value) { diameter = value*2.0; }
float getRadius(void) { return diameter/2.0; }
float xPosition;
float yPosition;
float zPosition;
float diameter;
};