|
Introduction to the Object-oriented
Approach
The fundamental idea behind an
object-oriented language is to combine
both data and the functions that
operate on the data into a single
unit. Such a unit is called an object.
Data members of an object can be
accessed only by using the functions
of the object. Therefore, the data is
hidden and is safe from accidental
alteration. Data and functions are
stored into a single entity.
The functions of an object are called
the member functions. These member
functions are called method in other
object-oriented languages like Small
Talk.
Introduction to the Object-oriented
Approach
Figure 10.1 shows the components of an
object in C++.

|
Figure 10.1
Componets of an Object |
|