I think the relationship should be association instead of inheritance
In the inheritance design
- Book is not BookItem, which violate OOP inheritance principle and SOLID Liskovo principle
- We can modify the Book data through BookItem objects, which I think a bad design
Course: Grokking the Low Level Design Interview Using OOD Principles - Learn Interactively
Lesson: Class Diagram for the Library Management System
Course: Grokking the Low Level Design Interview Using OOD Principles - Learn Interactively
Lesson: Class Diagram for the Library Management System