Note: Strategy pattern is not yet adopted here but more flexible than polymorphism.
* case: a default setAid() in super to be overridden by subclass to implement a /specialized/ formula
* case: getVpi() returns empty string in the base class (OLTUplinkPort) where there’s no “vpi” slot. In the ATM* subclasses, getVpi() returns the vpi slot.
* case: abstract isValid() declared in interface Validity.java.
* case: isSSCFIAccessible() is calculated differently for each building block class
“dynamic binding” is also known as dynamic dispatch. Compiler doesn’t know which version of the method to “bind the name to”. Only at runtime can the jvm put its finger on the most specialized subclass implementation.
In a circuit we have a list of CircuitElements objects, sitting on various levels of the inheritance hierarchy. We invoke isValid() on each. Some will run the isValid() inherited from a parent class, some will run the grand-parent’s implementation, but jvm ensures the most *specific* implementation in each case is chosen to run.