For each club meeting, the school activities program asks a leader to enter a member number. It reads a membership file and displays the member name before ...

Assessment: Computer Science 9210 | Paper 1 Mock 01 | Programming (on-screen) Subject: Computer Science - 9210

Question 1 Report

For each club meeting, the school activities program asks a leader to enter a member number. It reads a membership file and displays the member name before writing attendance to a separate file. A leader may accidentally enter letters instead of digits. The program includes a validation subroutine so that the same test can be used by every club.

(a) Explain one advantage of using a validation subroutine. [2]
(b) State the input data type expected for a member number. [1]
(c) When a member is found, explain why displaying the name before saving attendance is useful. [1]



In a multiplayer quiz game, the server stores each player's name and score in a leaderboard file after a round. The main program reads the file to display the top five players on a large board. A player name must contain from 3 to 12 characters, and the program must not save a score if the name is invalid. The game host can use an administrative command to clear the leaderboard before a new tournament.

(a) Explain why the name length should be validated before the score is written. [2]
(b) When displaying the leaderboard, state the output device used for the board. [1]
(c) Explain why clearing the leaderboard should be limited to the administrative command. [1]

Answer Details

Club attendance

  1. A validation subroutine can be reused by every club, so the same test is not rewritten repeatedly. Any later correction or change is made in one place. [2]
  2. A member number should be entered as an integer/numeric value. [1]
  3. Displaying the name before saving attendance lets the leader check that the correct member has been selected. [1]

Quiz-game leaderboard

  1. Name length validation prevents names outside the permitted 3 to 12 character range from being saved. This avoids invalid records or names that display badly on the board. [2]
  2. The board uses an output device such as a monitor, projector, or large display. [1]
  3. Clearing should be limited to the administrative command to prevent ordinary players accidentally or deliberately deleting stored scores. [1]

Download The App On Google Playstore

Everything you need to excel in your exams

Green Bridge CBT Mobile App
Personalized AI Learning Chat Assistant
200,000+ Exam Questions Across IGCSE, JAMB, WAEC & NECO
Over 3,900 Lesson Notes
Offline Support - Learn Anytime, Anywhere
Green Bridge Timetable
Literature Summaries & Potential Questions
Track Your Performance & Progress
In-depth Explanations for Comprehensive Learning