Back To Chapter one

C++ Classes:

Class and Object:
    A variable of the class type is called an object.
    For example,     int    Number_Of_Students;        //  int is a class and  Number_Of_Students is an object.
                             Circle   swimming_pool;              //  Circle is a class and swimming_pool is an object.
                             Boy   Austin,  Roger;                  //  Boy is a class and Austin and Roger are objects.
 
Example 1Boy Example

Example 2: Circle Example

Example 3:  Temperature Example

Example 4:  Time24

Note on the above example:
       // measurement functions
        float Circumference() const;
        float Area() const;
Constant member function can not modify the object's member data.