educative.io

Educative

Inheritance Question on Multiple Object Design Examples

Hi Design Gurus,
In Library Management and Parking Lot Object Design Admin, Librarian classes extending Account super class.
In Stack Overflow and Movie Ticket Object design Admin, Customer etc extend the Person super class.

Question: Account and (Admin, Librarian) classes does not seem to be similar objects. Stack Overflow and Movie Ticket Object design implementation seems to be fine.
Account is not a Person, how can Admin or Librarian extend Account.

Thanks,
Suresh