![]() |
![]() |
![]() |
![]() |
![]() |
|
Now you can be sure that your definition of the Movie class defines
the rating method by insisting that the Movie class
implements the RatingInterface interface.
Suppose that after a month passes, you have forgotten your decisions. The
interface will still insist that the Movie class define a
rating method, with your previously specified return value type and
argument types. If you hand off to another programmer the job of
Movie-class implementation, the interface will still insist that the
Movie class define the specified rating method. In both
situations, the interface retains a deployable memory of your design
decisions.