Student Records | Ruby | TestDome

https://www.testdome.com/questions/ruby/student-records/24340?visibility=1&skillId=6
Does anyone knows how should be this problem solved?