nus-cs2103-AY2021S1 / forum

20 stars 2 forks source link

1415 Sem 2 Class Diagram #522

Closed Wincenttjoi closed 3 years ago

Wincenttjoi commented 3 years ago

image

It is shown here that lecturer tutor and student inherits Person class. Would it be better if Person class is connected to the facade Data interface rather than its children? The Person class seems to be redundant in this case.

damithc commented 3 years ago

It is shown here that lecturer tutor and student inherits Person class. Would it be better if Person class is connected to the facade Data interface rather than its children? The Person class seems to be redundant in this case.

That might work too, if the Data class doesn't need to differentiate between the three types. Note that the Person class can still contain the common functionality, which justifies its existence even if not used by others.

nicktohzyu commented 3 years ago

perhaps it's done this way to signify that data has a list of students, list of tutors, etc, instead of just a list of persons