abc
abc

Reputation: 11949

associations direction and notation in uml class diagram

Seasoned with ER schemas I'm having a doubt with associations from passing to UML Class Diagram.

Consider this simple scenario:

You have to create a software system for a soccer team.
A team has almost 11 players and a player can play for just 1 team. You want to know:
-about the player: name, surname,role, team for who he plays, team/s for who he played and starting-end year
-about the team: name, city

Is this a correct uml class diagram for this situation?

My doubt is about the info "A team has almost 11 players":

Upvotes: 0

Views: 501

Answers (1)

Gangnus
Gangnus

Reputation: 24484

As you have set it, you will have to make a non-class construction inside Player and Team, that will do the class' work.

I would advice another structure.

All info will be contained in the Participation class, that will be mapped to DB table or a file. All other interesting info on team and player will be got by functions.

enter image description here

Upvotes: 2

Related Questions