Task 5 of 5 · 0 solved · 5 to go0%
You can read the problem, but answers are checked only for signed-in students. Sign in to answer →

Problem

11.3 Records — capstone: student records

Write a complete program with a record Student holding a name and a score, plus two methods: label() returning name (score) and passed() returning whether the score is at least 60.

Read a count and that many name/score pairs. Print the label of each student, then how many passed.

For 3 then Ada 90 Sam 55 Bo 70:

Ada (90)
Sam (55)
Bo (70)
2

No constructor, no getters, no toString — the record header gives you all of it.

time 1000 ms memory 256 Mb
Solution
Attempts: 0 A hint guides you to the fix — it never writes the code for you.
✦
Ready to check

Press «Submit» to run your code against the task's test cases — that is what sets your score. «AI review» is an optional second opinion: it reads your code — logic and style, not just the output — and suggests the next step without handing over the answer. It never changes your score.

Next module →
Working…