Open kyueran opened 1 year ago
How can we have a solution with separate Instructor and Coordinator classes while avoiding this problem?
Good question @kyueran
The answer will be given during this week's lecture.
Hint: we use the Person
class to represent the actual person (i.e., only one object per person) and Instructor
, Coordinator
classes to represent the roles played by that person (i.e., one object for each module taught by that person).
May I ask in the first screenshot it says there can be a solution with a separate Instructor and Coordinator class. But from the second screenshot it shows that if we have two separate classes we face the problem of having duplicate person as a coordinator and instructor (Tom in this case) which is not allowed. How can we have a solution with separate Instructor and Coordinator classes while avoiding this problem?