The Wildcats software needs to say what information every Player can hold before anyone's particular values are entered.
This is a design requirement written in ordinary words. A text value maps to string, a whole-number value to int, a decimal measurement here to double, and availability to bool.
If the underlying modeling idea is unfamiliar, use the lesson below while reading this example.
Each Player has a name as text.
Each Player has a jersey number as a whole number.
Each Player has a height in meters as a decimal measurement.
Each Player has an availability value that is true or false.Define the information supported by every Player
A name holds text
A jersey number holds a whole number
A height in meters holds a decimal measurement
Availability holds true or false
Describe types rather than one player's current valuesThese words describe the class contract, not a sequence of runtime actions. Identify the types, stored members, operation inputs and results, and relationships before choosing compartments and connectors.
Player. Use the class-name area, not an object-instance header with a colon.name : string and jerseyNumber : int on separate lines. Preserve each name and the name-before-type order.heightMeters : double and isAvailable : bool on their own attribute lines. Keep the operations compartment empty because the requirement defines no behavior.Compare this reference with the diagram you built in Violet. Layout may differ; the source meaning, labels, and relevant connections should agree.
The same class supports Jordan with jersey 7 and Casey with jersey 1. Neither value has to be written into the class diagram.