Internal Implementation is Hidden

Messages define a standard interface to objects. Objects may have different internal implementations as long as the message interface is maintained.

Example: Vector (send v x)

( 187., 111.)(0,0) ( 29., 0.) ( 200., 111.) ( 0., 82.) ( 29., 29.) ( 10., 92.) x ( 58., 43.) ( 51., 43.) ( 31., 97.) (5,-6) 27. ( 144., 86.) r ( 144., 51.) theta ( 138., 84.) (-3,-1) 29. ( 138., 56.) (-1,0) 29.

The two kinds of vectors appear the same to the outside world.

Contents    Page-10    Prev    Next    Page+10    Index