A Team can store a reference to an array of training scores. Its class diagram describes the field type, not today's scores.
This complete class fragment defines the field but does not allocate an array. It follows the introductory field style; reference-nullability warnings depend on project settings.
If the underlying C# feature is unfamiliar, use the lesson below while reading this example.
public class Team
{
public int[] RoundGoals;
}Define a Team type
Give every Team a public field named RoundGoals
That field can refer to an integer array
The declaration does not create an array or specify current scoresThese 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.
Team class node.+RoundGoals : int[]. Put the public marker, name, colon, and complete array type on one line.Compare this reference with the diagram you built in Violet. Layout may differ; the source meaning, labels, and relevant connections should agree.
Two Team objects can store references to arrays with different lengths and values while both follow this declaration. A new Team's field is initially null until assigned in this simple example.