Nested collections convert to domain types

All 3 scenarios hold

A student passes on their own average, so Pass Count is a count of students rather than of grades. Emma's average in the second row is exactly the pass mark, which is the boundary the rule is decided at.

expected outcome broken scenario
ScenarioStudent gradesPass MarkHighest Grade?Average Grade?Pass Count?
Every student above the mark
Alice
  • 95
  • 87
  • 92
Bob
  • 78
  • 85
  • 90
Charlie
  • 98
  • 89
  • 91
709889.43
One below, one at the mark
David
  • 45
  • 60
  • 70
Emma
  • 65
  • 70
  • 75
Frank
  • 82
  • 78
  • 60
708267.22
No students at all[:]7000.00