// File: ex4-1.cpp - the Circle class with ctor and dtor #include <iostream> using namespace std; class Circle { private: int radius; public: // member function prototypes Circle(int); ~Circle(); float area() const; void display() const; }; // member function definitions Circle::Circle(int r) // constructor { radius = r; } Circle::~Circle() // constructor { cout << "The destructor is called now\n"; } float Circle::area() const { return 3.14 * radius * radius; } void Circle::display() const { cout << radius << endl; } int main(void) { Circle c(5); // an instance (object) of Circle class cout << "The area of Circle c is " << c.area() << endl; cout << "Circle c has radius "; c.display(); }