A soccer snapshot needs to distinguish the player's jersey, availability, and turn count. Field names give those values their meaning.
This excerpt uses an existing Player with public fields name (string), jerseyNumber and numberOfTurns (int), and isAvailable (bool). Draw the pause after all assignments.
If the underlying modeling idea is unfamiliar, use the lesson below while reading this example.
Player jordan = new Player();
jordan.name = "Jordan";
jordan.jerseyNumber = 7;
jordan.numberOfTurns = 0;
jordan.isAvailable = true;
jordan.numberOfTurns = 1;Create Jordan as one Player
Store the name Jordan and jersey number 7
Start the turn count at 0 and availability at true
Record a turn by changing the turn count to 1
Pause after that updateThese words fix the snapshot moment and separate instances, values, and reference targets. Follow the source to that pause before deciding how many boxes to draw and which current values belong inside them.
jordan : Player. Choose the pause after the last line, not immediately after the initializer.name, jerseyNumber, numberOfTurns, and isAvailable. Use Violet's field/value areas rather than putting all information into the object heading.Jordan, 7, 1, and true beside their matching names. The turn count is 1 because its final update has executed.Compare this reference with the diagram you built in Violet. Layout may differ; the source meaning, labels, and relevant connections should agree.
Read numberOfTurns = 1 as: this particular player currently has one recorded turn. The 7 means jersey number because its field name says so.