educative.io

Educative

Why have the properties of Book (Parent Class) not been initialized in BookItem (Child Class) in Python?

BookItem is a child class of Book. So it has to call the constructor from the parent class so it can use those properties. Or am I missing something?

Also, why is Book been defined as an Abstract Class. An abstract class in python has one or more abstract methods. Book has None.


Course: Grokking the Object Oriented Design Interview - Learn Interactively
Lesson: Design a Library Management System - Grokking the Object Oriented Design Interview

yeah, you’re right but in the code heading you can see that we have written that this is not a complete code, it’s just an high level view of the uses cases.