I do not feel comfortable either. Especially because it makes no harm at all to repeat the instance variable in the sub-class but adds a lot to the readability of the code.
Thank you guys for the enriching responses. You're aces.
Cesar
Originally posted by Ernest Friedman-Hill:
This design makes me vaguely uncomfortable, and I think you feel the same way, or you wouldn't have written. This is one of those examples where extending a concrete class -- as opposed to extending an abstract one or implementing an interface -- leads you to write questionable code.