The training turn limit is fixed for each Player. A diagram can show both who can access a field and whether its value may be reassigned after initialization.
Use the UML annotation {readOnly} to show the assignment restriction. It is separate from the + or - visibility symbol. It does not mean the field is shared by all players.
| Diagram entry | Meaning |
|---|---|
- turnLimit : int {readOnly} |
Private limit whose assignment is restricted |
- numberOfTurns : int |
Private count that may change |
Player class box in Violet.- turnLimit : int {readOnly} and - numberOfTurns : int as separate attributes.readOnly.