You have now worked with two UML diagram types:
Both can describe a soccer system.
They answer different questions.
An object diagram focuses on:
What specific things exist, what values do they have, and how are they related?
An activity diagram focuses on:
What happens, in what order, and which path is followed?
Choosing the right diagram begins by identifying which question you are trying to answer.
Consider this soccer state:
player1 : Player
-------------------------
name = "Jordan"
isAvailable = true
team1 : Team
-------------------------
name = "Wildcats"
with a relationship connecting player1 to team1.
This model communicates specific objects and state.
It can tell you:
It does not primarily tell you the sequence of actions that caused this state.
Now consider this process:
Start
↓
Read player availability
↓
Is player available?
├─ [yes] → Add to available list
└─ [no] → Continue
↓
Display roster
↓
End
This model communicates behavior.
It can tell you:
It does not primarily describe all the field values inside player1.
This is a useful shortcut.
Use an object diagram when the important question is:
What exists in this snapshot?
Use an activity diagram when the important question is:
What happens next?
Those questions are not perfect definitions, but they are useful when choosing a diagram at this stage of the course.
The Boolean value:
isAvailable = true
could appear as state inside an object diagram.
An activity diagram could use the meaning of that state to choose a path.
Object-diagram view:
player1 : Player
-------------------------
isAvailable = true
Activity-diagram view:
Is player available?
├─ [yes] → Add to list
└─ [no] → Continue
The two diagrams are related, but they are not interchangeable.
One emphasizes the object's state.
The other emphasizes how a decision affects flow.
Imagine an activity diagram whose action nodes are filled with every field value for every soccer object.
The process would become difficult to follow.
Imagine an object diagram whose boxes are arranged in a long chain to imply a sequence of events.
The timing and flow would be ambiguous.
A model becomes clearer when its representation matches its purpose.
Object diagrams often focus attention on specific things such as:
player1 : Playerteam1 : Teammatch1 : Matchand their current information.
They are useful for discussing:
Activity diagrams often focus attention on verbs:
and on how those actions connect.
They are useful for discussing:
Neither diagram should include everything about the soccer system.
The object diagram includes the objects, values, and relationships needed for its purpose.
The activity diagram includes the actions and paths needed for its purpose.
Abstraction applies to both.
The question is always:
Which information is needed for this model to answer the question it was created to answer?
A technical team might use both diagrams.
An object diagram could establish that:
player1.isAvailable = true
An activity diagram could show what the system does when the availability condition is true.
Later, C# code can implement related state and behavior.
The models do not have to contain identical information.
They provide complementary views of the same computerized system.
Keep this distinction available as the course continues:
| If you need to understand... | Useful diagram |
|---|---|
| specific objects and their current values | UML object diagram |
| relationships among specific object instances | UML object diagram |
| ordered actions in a process | UML activity diagram |
| a decision and its possible paths | UML activity diagram |
As you encounter new UML diagram types later, the same principle will matter.
Each model exists to answer a particular kind of question.