Model the public access contract separately from the private field it uses. This course labels C# properties explicitly so readers can distinguish them from ordinary fields.
| Entry | Meaning |
|---|---|
- jerseyNumber : int |
Private backing field |
+ JerseyNumber : int <<property>> {get; set;} |
Public property with public read and write access |
The annotation is a course mapping convention. Violet accepts it as diagram text. The two entries do not represent two independent stored jersey numbers: the accessors use the backing field.
Player class box.<<property>> identifies a C# property and {get; set;} lists its accessors.For a getter-only property use {get;}. For a public getter with a private setter, our annotation is {get; private set;}. A missing setter and a private setter are different contracts.