text cover

Data Abstraction and Problem Solving with C++

Walls and Mirrors

by Frank M. Carrano

Addison Wesley Logo

Sphere Class Reference

#include <Sphere406.h>

Inheritance diagram for Sphere:

Inheritance graph
[legend]
List of all members.

Detailed Description

Definition at line 15 of file Sphere406.h.

Public Member Functions

 Sphere ()
 Sphere (double initialRadius)
void setRadius (double newRadius)
double getRadius () const
double getDiameter () const
double getCircumference () const
virtual double getArea () const
double getVolume () const
virtual void displayStatistics () const

Private Attributes

double theRadius


Constructor & Destructor Documentation

Sphere::Sphere  ) 
 

Definition at line 6 of file Sphere406.cpp.

Sphere::Sphere double  initialRadius  ) 
 

Definition at line 10 of file Sphere406.cpp.


Member Function Documentation

void Sphere::setRadius double  newRadius  ) 
 

Definition at line 14 of file Sphere406.cpp.

References theRadius.

double Sphere::getRadius  )  const
 

Definition at line 20 of file Sphere406.cpp.

References theRadius.

Referenced by displayStatistics(), and Ball::getArea().

double Sphere::getDiameter  )  const
 

Definition at line 25 of file Sphere406.cpp.

References theRadius.

Referenced by displayStatistics(), and getCircumference().

double Sphere::getCircumference  )  const
 

Definition at line 30 of file Sphere406.cpp.

References getDiameter().

Referenced by displayStatistics().

double Sphere::getArea  )  const [virtual]
 

Reimplemented in Ball.

Definition at line 35 of file Sphere406.cpp.

References theRadius.

Referenced by displayStatistics(), and getVolume().

double Sphere::getVolume  )  const
 

Definition at line 40 of file Sphere406.cpp.

References getArea(), and theRadius.

Referenced by displayStatistics().

void Sphere::displayStatistics  )  const [virtual]
 

Definition at line 45 of file Sphere406.cpp.

References getArea(), getCircumference(), getDiameter(), getRadius(), and getVolume().


Member Data Documentation

double Sphere::theRadius [private]
 

Definition at line 37 of file Sphere406.h.

Referenced by getArea(), getDiameter(), getRadius(), getVolume(), and setRadius().


The documentation for this class was generated from the following files:

Generated on Sun Aug 27 20:00:05 2006 for AWLogo by  doxygen 1.4.6