[an error occurred while processing this directive]

Class 15 Notes

Lecture Slides, Suitable For Printing

Notes

(define (make-counter)
   ((lambda (count)
      (lambda ()
        (set! count (+ 1 count))
        count))
   0))
Draw the environment after:
   (define counter (make-counter))
   (counter)









What is an object?





Why is it useful to package state and procedures together?




Inheritance is using the definition of one class to make another class.


The class TalkingDog inherits from Dog.
TalkingDog is a subclass of Dog.
The superclass of TalkingDog is Dog.


If I have seen further it is by standing on the shoulders of giants.
Isaac Newton (on inheritance?)

If I have not seen as far as others, it is because giants were standing on my shoulders.
Hal Abelson (on subtyping?) [an error occurred while processing this directive]