![]() |
![]() |
![]() |
![]() |
![]() |
|
In the remainder of this chapter, you see how to add a model and an observer to the example of Segment 726 so as to ground the illustration of Segment 761 in a program that exhibits all the elements described in Segment 760:
Movie class instance, with the Movie
class modified so as to extend the Observable class.
MovieObserver class,
which defines a method, that, when activated, fetches a movie's rating
from the application's movie instancethe modeland relays that
rating to the application's meter instancethe view.