// Example 65 #include #include #include using namespace std; #include "sphere1.h" int main() { sphere globe; // globe.x_center = 1.0; This would cause an error. Instead we use... globe.assign_center( 1.0, 2.0, 3.0 ); globe.assign_radius( 5.0 ); double x = globe.get_x_coord(); double y = globe.get_y_coord(); double z = globe.get_z_coord(); double r = globe.get_radius(); cout << "The sphere is centered at (" << x << "," << y << "," << z << ")"; cout << "\nand it has radius " << r << endl; cout << "The volume of the sphere is " << globe.volume(); cout << "\n\n"; system( "PAUSE" ); return( EXIT_SUCCESS ); }