![cover-img](https://project-assets.showwcase.com/1420x/16381/1673484976997-0_bKw_eYs-EsV9XndG.jpg?type=webp)
Code Smell 43 - Concrete Classes Subclassified
12 January, 2023
8
8
0
Contributors
Problems
•
Bad Models
•
Coupling
•
Liskov Substitution Violation
•
Method overriding
•
Mapper fault
Solutions
1.
Subclasses should be specializations.
2.
Refactor Hierarchies.
3.
Favor Composition.
4.
Leaf classes should be concrete.
5.
Not leaf classes should be abstract.
Sample Code
Wrong
Right
Detection
Tags
•
Conclusion
Relations
More Info
Software is a gas; it expands to fill its container.