lundi 1 mars 2021

Object oriented design - Library management system

I'm working on the class diagram for library management system and need help in defining the relationships between the following classes - person, member, librarian and account.

In my solution, I kept it as: Person has an Account instance Member and Librarian extends Person

But, when I referred to other solutions available on internet and famous interview preparing courses, it is modelled as follows: Account has a Person instance Member and Librarian extends Account

Can you please help with what advantage does the second one gives over first? What should be the correct way to go forward?

Aucun commentaire:

Enregistrer un commentaire