Model review and simulation > Reviewer > Provided PTC reviews > Correctness reviews > Subclass hides attribute (Reviewer Review)
Subclass hides attribute (Reviewer Review)
A subclass contains an attribute with the same name as a non private attribute in a superclass. In deep hierarchies this can be easily done.
Consequences
This naming reuse can confuse developers and cause errors during development.
Strategy
Often this hiding is caused when the designer did not realize that a superclass had the same attribute and therefore doe not need to add it to the subclass.
If the attribute's purpose is different from the superclass then it should be renamed.