dragonwell
Programmer
Is this a pattern / known-technique?
Say a car has an "OK" attribute, indicating it's in an operable state. Each component of the car has an OK attribute, too. A lug-bolt is OK if it's tight. A Wheel is OK if all it's lug-bolts are OK. A Drive-train is OK if all it's wheels are OK, etc, etc, Finally the whole car is OK if all it's components report being ok.
Does this only work if the heirarchy is a tree and not a graph?
Comments?
Say a car has an "OK" attribute, indicating it's in an operable state. Each component of the car has an OK attribute, too. A lug-bolt is OK if it's tight. A Wheel is OK if all it's lug-bolts are OK. A Drive-train is OK if all it's wheels are OK, etc, etc, Finally the whole car is OK if all it's components report being ok.
Does this only work if the heirarchy is a tree and not a graph?
Comments?