volume_mute
Inheritance and Object Class Testing
publish date: 2026/06/17 05:25:30.628987 UTC
volume_mute
Why does inheritance or generalization make object class testing more complicated?
Correct Answer
An inherited operation may make assumptions about other operations and attributes that may not be valid in all subclasses
Explanation
Inheritance complicates testing because you cannot simply test an operation in the class where it is defined and assume it works in all subclasses. An inherited operation may make assumptions about other operations and attributes that may not be valid in some subclasses. Therefore, inherited operations must be tested everywhere they are used.
Reference
Software Engineering, Ian Sommerville, 10th edition
