Introduction to OOP: Chapter 17 : Visibility and Dependency [next] [previous] [audio] [real] [text]

Active Values

The creation of active values is a good illustration of why parameter coupling is better than direct manipulation.

Suppose we have an existing program and we just want to observe a data value - see when it gets set and changed.

Solution - create a new subclass that just changes those methods that set or read the data value.

Intro OOP, Chapter 17, Slide 12