![]() |
![]() |
Articles / TULARC / Software / OO Technology / | ![]() |
|
![]() |
||||
![]() |
![]() |
|||
![]() |
![]() |
|||
![]() |
||||
|
|
||||
![]() |
![]() |
|||
![]() |
2.4) Is There A Difference Between Being A Member Or Instance Of A Class? (Typing - Object-Oriented Technology) |
![]() |
||
![]() |
||||
![]() |
![]() |
![]() |
||
![]() |
||||
![]() |
![]() |
![]() |
![]() |
||
![]() |
||
![]() |
![]() |
![]() |
![]() |
||
|
|
||
![]() |
||
![]() |
![]() |
![]() |
![]() |
||
![]() |
||
This article is from the Object-Oriented Technology FAQ, by Bob Hathaway rjh@geodesic.com with numerous contributions by others.
Yes (but be careful of context). To use C++ terminology, an object (not
a reference) is defined to be an instance of exactly one class (in classical
OO), called its most derived class. An object not directly contained in any
other is called the complete object [Stroustrup 90]. An object is a member
of several classes, including all of the classes its declared (or most derived)
class inherits from. With static typing and inclusion polymorphism based on
class, if a polymorphic object (or reference) is made to refer to an object,
that object must be a member of the polymorphic object's class.
This also provides a good example of differing definitions among object-
oriented languages, since a member is defined as above in CLOS, but a member of
a class is one of its instance variables in C++.
 
Continue to:
programming, software, coding, Object-Oriented, language, dynamic binding, constructor, destructor, overriding, methods, inheritance, reflection, persistence, MFC, real-time, polymorphism, system, database, vendor
![]() |
|
|