Test data for grade algorithm

2025-familiarisation-se-q05 · Table Response · 3 marks

Source: NESA 2025 HSC Software Engineering Familiarisation Q5

Question

Consider the following algorithm.

BEGIN determineGrade
  get Mark
  CASEWHERE Mark
    >=80 : Grade = "H"
    >=50 : Grade = "P"
    OTHERWISE : Grade = "N"
  ENDCASE
  print Grade
End determineGrade

Use the following table to provide a set of test data that will thoroughly test the algorithm. Include the expected outputs and reasons for inclusion. You may assume that all input data are valid.

Response table

Test data (Mark)Expected output (Grade)Reason for inclusion
Reveal answer
Mark Grade Reason
49 N Boundary below pass
50 P Pass boundary
79 P Boundary below high
80 H High distinction boundary
100 H Upper valid value

Marking rubric

MarksDescription
3Provides thorough test data with expected outputs and reasons.
2Provides suitable test data with expected outputs.
1Provides some relevant test data.

Explanation

Thorough test data should include boundary values around 50 and 80, and representative values from each grade range.

Metadata

Submitter
Seed data
Created
2026-05-02
Status
published
Syllabus
y12-project-test-and-debug-code
Tags
test data algorithms boundary testing CASEWHERE