TK Study

Software Engineering › How to answer › matching and table-completion questions

How to answer matching and table-completion questions

Matching and classifying questions are about relationships: one-to-one, or many-to-one. Table completion (like test data) asks you to fill in rows with reasons. First decide which kind of table you are facing. From course notes

What it looks like in the real exam

From NESA material 2025 HSC: 2025 HSC exam, Q9 (match three characteristics to ORM, SQL or both, using a tick table). 2025 sample: 2025 NESA sample exam, Q5 (match four implementation methods to descriptions), 2025 NESA sample exam, Q8 (classify five strategies as SAST or DAST, 2 marks) and 2025 NESA sample exam, Q11 (complete a test-data table: input, expected output, reason, 3 marks). 2025 familiarisation: 2025 NESA familiarisation exam, Q5 (same test-data task for a grade algorithm), 2025 NESA familiarisation exam, Q3 (matching).

Method

  1. Read the question and look at the table: the columns, the rows, and what you must put in each cell (a tick, a letter, a word, a value). From course notes
  2. Work out the rule for the options. Can each option be used once (one-to-one, like four implementation methods for four descriptions), or many times (classify each item as SAST or DAST), or can a row have two ticks (Q9 row 2 has two)? General advice
  3. Do the certain ones first and cross off used options in one-to-one matching; what remains is forced. General advice
  4. For a table you must write (test data): a row needs three things: the input, the expected output, and the reason. Cover each path and each boundary on both sides. From NESA material NESA: “thoroughly tests … with expected outputs and reasons for inclusion”.
  5. Re-read the question. Check every row has an answer, the columns are in the right order, and no option is used where it should not be. From course notes

Worked example 1: matching with reuse (2025 HSC Q9)

2025 HSC exam, Q9 · 1 mark

Match each characteristic to ORM, SQL, or both: (1) Code is focused on object manipulation; (2) Tables can be joined to enhance searching; (3) Programmers can choose the language used to access the database. [Characteristics as printed in the MG answer table; the question's introductory wording is not published.]

Official marking criteria

  • 1 mark: Correctly matches each characteristic to the appropriate approach.

NESA answer

(1) ORM only. (2) Both ORM and SQL. (3) ORM only.

Notes

Read from the MG table layout: row 2 has two ticks; rows 1 and 3 have one tick in the ORM column.

Open this question page

Reasoned Here the options are reusable and a row can have two ticks, so judge each row alone: (1) “Code is focused on object manipulation” is ORM (an ORM represents rows as objects). (2) “Tables can be joined” works in SQL and, through the ORM, too. (3) “Programmers can choose the language” is tied to ORM, as the MG shows. See Object-relational mapping (ORM).

Worked example 2: classify (2025 sample Q8)

2025 NESA sample exam, Q8 · 2 marks

The strategies below can be used to test the security of a web application that contains a database. Classify each as EITHER SAST OR DAST: (1) Simulate attacks on the web application; (2) Check the way SQL queries are constructed; (3) Test the database's web interface for vulnerabilities; (4) Test the web application used to interact with the database when it is running; (5) Analyse the code for connecting to the database to identify security vulnerabilities.

Official marking criteria

  • 2 marks: Correctly classifies all the strategies.
  • 1 mark: Correctly classifies THREE strategies, which must include ONE SAST and ONE DAST.

Answer (reasoned; the MG answer is an image)

SAST: (2) and (5). DAST: (1), (3) and (4).

Notes

REASONED (not copied): the MG answer is an image/table that could not be extracted. SAST = static, analyses code without running it; DAST = dynamic, tests the running application (simulated attacks, probing interfaces).

Open this question page · some of the NESA wording or answer is an image or is unpublished, as noted

From NESA material The marking rule: 2 marks for all five correct; 1 mark for three correct, which must include one SAST and one DAST. So do not put everything under one heading. Rule of thumb: SAST looks at code without running it (statements 2 and 5); DAST tests the running application (1, 3, 4). See Static application security testing (SAST) and Dynamic application security testing (DAST).

Worked example 3: a test-data table (2025 sample Q11)

2025 NESA sample exam, Q11 · 3 marks

Algorithm: BEGIN responsiveScreen / Get ScreenSize / IF ScreenSize >= 1024 THEN Viewport = 'Desktop' / ELSEIF ScreenSize >= 768 THEN Viewport = 'Tablet' / ELSE Viewport = 'Phone' / ENDIF / Display "Display set to ", Viewport / END. Provide a set of test data that will thoroughly test the algorithm. Include expected outputs and reasons for inclusion. (Table: Test data (ScreenSize), Expected output (Viewport), Reason for inclusion; 3 rows shown.)

Official marking criteria

  • 3 marks: Test data that thoroughly tests the algorithm, with expected outputs and reasons.
  • 2 marks: Tests most of the boundaries and paths, with relevant outputs and reasons.
  • 1 mark: Some relevant information.

NESA sample answer

1024 -> Desktop (boundary check). 768 -> Tablet (boundary check). 100 -> Phone (below lowest screen size check). 850 -> Tablet (between Tablet and Desktop). 2000 -> Desktop (above highest screen size check).

Open this question page

From NESA material The notes on the official sample add good extras: 1023 and 767 (just below the boundaries). The pattern is: each boundary value, a value just below it, and one value for each path.

Applied to the familiarisation grade algorithm (2025 NESA familiarisation exam, Q5), whose boundaries are 80 and 50:

Test inputExpected outputReason for inclusion
85HAbove 80
80HBoundary value: tests the “>= 80” edge
79PJust below the boundary (extra, from the pattern above)
60PBetween 50 and 80
50PBoundary value 50
49NJust below boundary 50 (extra)
45NTests the “otherwise” path

Original practice Rows 85, 80, 60, 50 and 45 come from the NESA sample answer for 2025 NESA familiarisation exam, Q5; the 79 and 49 rows are my extra suggestions. The algorithm is reconstructed from the boundaries in the sample answer (the NESA stem is unavailable): IF Mark >= 80 THEN "H" ELSEIF Mark >= 50 THEN "P" ELSE "N", and I checked every row by running it.

Common mistakes

  • General advice Using only “middle” values and no boundaries.
  • General advice Giving inputs with no expected output, or no reason (the 3-mark criterion needs all three).
  • From NESA material The 1-mark SAST/DAST rule needs one of each: a lazy all-one-column answer scores nothing.
  • General advice Matching by word association instead of definition (“phased” ≠ “pilot”: phased = replaces gradually; pilot = a small group first).

Time per mark

General advice Matching: about 1 to 1.5 minutes per mark. Test-data tables: about 5 minutes for 3 marks, which matches 1.75 min × 3 = 5.25 min.

Practice (5 items, with answers)

Item 1 · 2025 sample Q5 (implementation methods)

Match Direct, Parallel, Phased, Pilot to: (i) the new system runs immediately with no delay; (ii) the new system gradually replaces the old; (iii) both systems run at the same time; (iv) the new system is trialled with a small group and then implemented entirely.

Show the answer

Answer: (i) Direct (ii) Phased (iii) Parallel (iv) Pilot. The NESA MG answer is an image; these are the standard definitions from the course. See Direct implementation, Parallel implementation, Phased implementation, Pilot implementation.

Item 2 · 2025 sample Q8 (SAST or DAST)

Classify each: (1) simulate attacks on the web application; (2) check the way SQL queries are constructed; (3) test the database’s web interface for vulnerabilities; (4) test the web application while it is running; (5) analyse the code for connecting to the database.

Show the answer

Answer: SAST: 2 and 5. DAST: 1, 3, 4. Reasoned

Item 3 · 2025 HSC Q9 (ORM, SQL or both)

Which of ORM / SQL / both: (1) code is focused on object manipulation; (2) tables can be joined to enhance searching; (3) programmers can choose the language used to access the database.

Show the answer

Answer (NESA table): (1) ORM only; (2) both; (3) ORM only. From NESA material

Item 4 · original: test data for a ticket validator

A program accepts a number of tickets from 1 to 10 inclusive and shows “OK” or “Invalid”. Give a test-data table of 5 or more rows with expected output and reason.

Show the answer
InputExpectedReason
1OKLower boundary
0InvalidJust below the lower boundary
10OKUpper boundary
11InvalidJust above the upper boundary
5OKTypical value between the limits
-3InvalidFar outside the range (negative)

Original practice Checked by running the validation code.

Item 5 · original: match the data type

Match each value to a data type (Integer, Real, Boolean, String): 42; 3.14; True; "Sam".

Show the answer

Answer: 42 Integer; 3.14 Real (float in Python); True Boolean; "Sam" String. Original practice

← How to answer fill-in-the-blank and dropdown questionsHow to answer pseudocode questions →