// Justin C. Miller
// University of Wisconsin Oshkosh
// Made for: http://www.geocities.com/neonprimetime.geo/index.html
// Date: 2001
// Borland Builder 4.0
// system("cls"), system("pause"), const
#include 
#include  // must have to use system("")

const double PI = 3.14 ; // defines PI, since
			// it is const it can never be changed
			// thus in main if i tried to put
			// PI = 2, it would give me a
			// syntax error
			// now whereever i want 3.14, i can
			// just type PI instead of 3.14

class Circle
{
private:
	double radius ;
public:
	Circle() ; // 1st constructor
	Circle(double) ; // 2nd constructor
	double diameter() ;
	double area() ;
	double circumference() ;
	void setRadius(double) ;
	double getRadius() ;
} ;

Circle::Circle()
{radius = 0 ;}

Circle::Circle(double r) 
{radius = r ;}

double Circle::getRadius()
{return radius ;}

void Circle::setRadius(double r)
{radius = r ;}

double Circle::diameter()
{return 2 * radius ;}

double Circle::circumference()
{return diameter() * PI ; }

double Circle::area()
{return PI * radius * radius ; }

int main()
{
	Circle a ;		// uses the 1st constructor
	Circle b(10) ;  // uses the 2nd constructor

	cout << "After Circle a  &  Circle b(10) ...." << endl ;
	cout << "Radius of Circle a = " << a.getRadius() << endl ;
	cout << "Radius of Circle b = " << b.getRadius() << endl ;
	system("pause") ;
	system("cls") ;

	a.setRadius(5) ;

	cout << "After a.setRadius(5) ..." << endl ;
	cout << "Radius of Circle a = " << a.getRadius() << endl ;
	cout << "Radius of Circle b = " << b.getRadius() << endl ;
	system("pause") ;
	system("cls") ;

	cout << "Diameter of Circle a = " << a.diameter() << endl ;
	cout << "Diameter of Circle b = " << b.diameter() << endl ;
	system("pause") ;
	system("cls") ;

	cout << "Area of Circle a = " << a.area() << endl ;
	cout << "Area of Circle b = " << b.area() << endl ;
	system("pause") ;
	system("cls") ;

	cout << "Circumference of Circle a = " << a.circumference() << endl ;
	cout << "Circumference of Circle b = " << b.circumference() << endl ;

	return 0 ;
}

    Source: geocities.com/neonprimetime.geo/cpp/cpp_SourceCode

               ( geocities.com/neonprimetime.geo/cpp)                   ( geocities.com/neonprimetime.geo)