
Here is my UML class diagram. I’ve realized that I have an issue with the way my Student, Team Member and Team Liaison are set up.
A student can be part of the system and then join a team, therefore becoming a team member. A team member can also be a team liaison (the team leader who can grant requests to join their team).
I realize that changing a Student into a TeamMember is a problem but I’m not really sure how to approach it.
Thanks for any advice!~
I’ve found when dealing with people and their roles in a system, it is best to have a Role class, with Person having Roles.
So, Person has zero or more Roles. Student is a Role, Professor is a Role, …
For teams, I’d have a Team class that has zero or more TeamMembers. A TeamMember or type of TeamMember (like ProjectTeamMember, which is associated with a Project) can be a Person’s Role too.
This design allows for the same Person to play different roles at different times, while keeping the details clean and separate. E.g. if you have a Person “Joe Blow”, Joe could be a Student (and have corresponding relationships like ClassSection), a member of a Project (where you could find out the other people in Joe’s team), …
Read more here:
UML 2 Class Diagrams