in reply to should container classes override the value of contained classes (Resources.pm)
For example: if the front wheels of a car should have a tire pressure 5 more psi than the default, then you would set the default in the container class and then "specialize" it to 5 more psi for the front wheels.
The use of the word "specialize" might be a clue that it might be better to model front-wheels as being a subclass of wheel ;-)
But, ignoring that, you can argue it the other way. For example. it would make equal sense for a car container to override the default tire.pressure in a different way from a lorry container.
It's a mildly odd model, but it does make sense (IMO).
|
|---|