![]() |
Data Abstraction and Problem Solving with C++Walls and Mirrorsby Frank M. Carrano |
![]() |
Sphere403.hGo to the documentation of this file.00001 00015 class Sphere 00016 { 00017 public: 00018 // constructors: 00019 Sphere(); 00020 Sphere(double initialRadius); 00021 // copy constructor and destructor supplied 00022 // by the compiler 00023 00024 // Sphere operations: 00025 void setRadius(double newRadius); 00026 double getRadius() const; 00027 double getDiameter() const; 00028 double getCircumference() const; 00029 double getArea() const; 00030 double getVolume() const; 00031 virtual void displayStatistics() const; 00032 00033 private: 00034 double theRadius; // the sphere's radius 00035 }; // end Sphere |