home *** CD-ROM | disk | FTP | other *** search
/ Microsoftware Monthly 19…2 Programming Power Tools / MASO9512.ISO / cpptutor / cpptutor.arj / CH14 / A140945.TXT < prev    next >
Encoding:
Text File  |  1993-09-27  |  625 b   |  11 lines

  1. You can think of the traffic signal in this example as a piece of
  2. client code.  You can think of the different kinds of traffic as
  3. objects of classes that are all derived from the same base class.
  4. Just as the traffic signal sends the same message to all three
  5. kinds of traffic, the client code in a C++ program that uses
  6. polymorphism treats objects from different derived classes as if
  7. they were objects of the base class.  And just as the different
  8. kinds of traffic react in their own individual ways to the traffic
  9. signal, the objects of derived classes react individually to
  10. function calls from the client code.
  11.