A record type groups fields, here Student with a name and an average. An array of records is drawn as a table.
Student
- Run it with 3 students, for example Ana 4.5, Marko 3.8 and Jovana 4.9.
- Watch the table in the Arrays tab while the records are sorted, and see the record type in the code (a struct in C, a class in Java).
Teacher
- In the editor File, Records… defines the types and their fields; a Declare block then offers the type.
- Use s.name and a[i].avg in expressions; an assignment copies the whole record.