![]() |
Data Abstraction and Problem Solving with C++Walls and Mirrorsby Frank M. Carrano |
![]() |
SphereDemo.cppGo to the documentation of this file.00001 00016 #include <iostream> 00017 #include "Sphere.h" 00018 00019 using namespace std; 00020 00021 int main() 00022 { 00023 Sphere unitSphere; // radius is 1.0 00024 Sphere mySphere(5.1); // radius is 5.1 00025 00026 unitSphere.displayStatistics(); 00027 mySphere.setRadius(4.2); // resets radius to 4.2 00028 cout << mySphere.getDiameter() << endl; 00029 00030 return 0; 00031 } // end main |