Mock exam
82 marks · 2 hours 30 minutes including 10 minutes reading time · attempt it under timed conditions, then check against the guidelines. Sit it online with the marker
Section I: objective questions (20 marks)
1. 1 mark
Which action BEST reduces bias in an ML hiring tool?
- Use diverse, representative training data and regularly audit outcomes
- Remove all testing to save time
- Hide how the model works
- Train it only on past hires
2. 1 mark
Which is the BEST way to reduce the risk of an API exposing more data than intended?
- Return only the fields the client needs and require authentication and authorisation on each endpoint
- Return the entire database record for every request
- Disable error logging
- Allow unlimited anonymous requests
3. 1 mark
Tables. Students(StudentID, Name, Year, House): (1,Ava,12,Red) (2,Ben,11,Blue) (3,Cleo,12,Blue) (4,Dan,12,Red) (5,Eli,11,Red). Scores(StudentID, Subject, Mark): (1,SE,80) (1,Maths,70) (2,SE,60) (3,SE,90) (4,SE,50) (5,Maths,75).
What does this query return?
SELECT House, COUNT(*) FROM Students GROUP BY House ORDER BY House;
- Blue 2, Red 3
- Blue 3, Red 2
- Red 5
- Blue 1, Red 1
4. 1 mark
Binary search can only be used when the list is:
- Shorter than 10 items
- Made of strings
- Sorted
- Unsorted
5. 1 mark
Which action is an example of hardening a system?
- Disabling unused services and changing default passwords
- Adding extra advertising banners
- Installing more games on the server
- Increasing screen brightness
6. 1 mark
Metadata is best described as:
- Data about other data, such as the time and location a photo was taken
- Very large data sets
- Data stored only in the cloud
- Data that has been encrypted
7. 1 mark
An app collects only the data it needs and deletes location history after 30 days. Which privacy-by-design idea does this BEST show?
- Maximising data collection for future uses
- Reacting to a breach after it occurs
- Embedding privacy into the design (data minimisation and retention limits)
- Making privacy an optional extra
8. 1 mark
Which protocol is used to send an email from a mail client to a mail server?
- IMAP
- POP3
- SMTP
- DNS
9. 1 mark
A team member reads through a colleague's source code looking for logic and security flaws before it is merged. This is:
- Load testing
- Code review
- Dynamic application security testing
- Penetration testing
10. 1 mark
Identify ALL the items that are the goals of regulatory compliance in relation to software development.
- Limiting the need for software updates
- Protecting sensitive data from unauthorised access
- Allowing developers to bypass security features when needed
- Reducing the testing time required during software development
- Ensuring software applications meet legal and industry standards
11. 1 mark
Which set of test data is MOST useful for the rule 'accept ages from 13 to 18 inclusive'?
- 12, 13, 18, 19
- 1, 2, 3, 4
- 13, 14, 15, 16
- 20, 30, 40, 50
12. 1 mark
Which technology allows a progressive web app (PWA) to work offline?
- Image maps
- Service workers that cache resources
- Frames
- Server-side session variables
13. 1 mark
(Tick the scenarios marked TRUE in the NESA answer. Original stem not published; the task is reconstructed from the marking guideline: which scenarios suit logistic regression?)
- Identifying whether a received email is spam
- Determining the outcome of a two-party election
- Calculating house prices based on land size
- Investigating the relationship between height and weight
- Estimating the rate at which a contagious illness will spread
- Working out if someone will be admitted to a university course
14. 1 mark
In public-key (asymmetric) encryption, how is a message sent confidentially to Sam?
- Encrypt it with Sam's public key; only Sam's private key can decrypt it
- Encrypt it with Sam's private key so everyone can read it
- Encrypt and decrypt with the same shared secret key
- Hash it so that Sam can reverse the hash
15. 1 mark
What does this Python code display?
values = [3, 8, 5] values.append(1) values.sort() print(values[-1], len(values))
- 8 4
- 5 4
- 1 4
- 8 3
16. 1 mark
An HTML element has id="intro" and class="note". The CSS has p {color:red;} .note {color:blue;} #intro {color:green;}. What colour is the text?
- Red
- Green
- Black
- Blue
17. 1 mark
Which of these is an example of BROKEN authentication?
- Storing passwords as salted hashes
- Locking the account after five failed attempts
- Allowing the password '1234' and unlimited login attempts
- Requiring multi-factor authentication
18. 1 mark
Consider the algorithm fragment. REPEAT DoThis UNTIL x<=5 OR y=8 Which of the following is logically equivalent?
- DoThis WHILE x>5 AND Y< >8 DoThis ENDWHILE
- DoThis WHILE x<=5 AND y=8 DoThis ENDWHILE
- DoThis WHILE x<=5 OR y=8 DoThis ENDWHILE
- DoThis WHILE x>5 OR Y< >8 DoThis ENDWHILE
19. 1 mark
In a class diagram, a hollow-headed (triangle) arrow between two classes shows:
- Inheritance (generalisation): the subclass is a kind of the superclass
- A data store
- Ownership of a database table
- A loop
20. 1 mark
Which OOP concept is shown when a class keeps its data private and exposes it only through methods?
- Polymorphism
- Inheritance
- Abstraction
- Encapsulation
Section II: written, code and extended responses (62 marks)
21. 1 marks Short answer
Which of the following should take place during the requirements definition step when developing a software solution? A. Identifying algorithms to be used B. Documenting security vulnerabilities C. Identifying potential security threats in the software D. Documenting the needs and constraints of the software
22. 1 marks Short answer
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.]
23. 1 marks Short answer
[Exact question wording is not published as a paper (online exam). Task as shown by the NESA marking guidelines/mapping grid: web protocols (authentication)]
24. 1 marks Short answer
[Exact question wording is not published as a paper (online exam). Task as shown by the NESA marking guidelines/mapping grid: data structures, dropdowns]
25. 1 marks Short answer
[Exact question wording is not published as a paper (online exam). Task as shown by the NESA marking guidelines/mapping grid: software development approaches, two dropdowns]
26. 2 marks Short answer
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.
27. 3 marks Extended response
The following storyboard shows the navigation for a simple menu structure. | 3 MENU Screen 1 | Screen 1 | Screen 2 | Screen 2 Done | Done Screen 3 | Screen 4 Screen 3 | Screen 4 Quit Done | Done Quit A click on a button on the menu screen generates an appropriate number (from 1 to 4, or 9 if Quit is clicked) which is stored in the variable ButtonClick. A click anywhere else on the screen generates a 0. Write an algorithm for the menu screen that allows a user to access the other screens, exiting when the Quit button is clicked. Do NOT include the logic for any of the other screens.
28. 3 marks Short answer
A food delivery service offers prepackaged meals tailored to different dietary preferences, for example, vegetarian and gluten-free. It has developed a website for customers to place orders. The website is ready for testing and feedback. The website includes: a menu that dynamically updates based on meal availability; user accounts where customers can track deliveries and manage subscriptions; a backend that processes orders and payments, updates stock and communicates with the delivery team. (a) Outline potential social and ethical issues associated with the use of this website. (3 marks)
29. 3 marks Short answer
How can the effects of human bias be minimised when training machine learning algorithms? (3 marks, max 75 words)
30. 3 marks Short answer
[Exact question wording is not published as a paper (online exam). Task as shown by the NESA marking guidelines/mapping grid: complete a data dictionary using dropdowns]
31. 3 marks Short answer
Explain how the load time of a web page can be improved using a progressive web app (PWA). (3 marks, max 75 words)
32. 3 marks Pseudocode
PseudoPizza sells custom-designed pizzas. The price of a small pizza is $10. Added costs: Medium size $2; Large size $4; each topping $1.50. An algorithm is needed to calculate the cost of pizzas ordered for a customer. The algorithm should calculate and display: the cost of each pizza; the total cost of the order. Write the algorithm using pseudocode. Include at least one subroutine in your answer. You may assume that all inputs are valid. (3 marks)
33. 3 marks Extended response
A palindrome is a word that reads the same forward and backward, such as the words | 3 ‘refer’ and ‘noon’. The following code fragment checks whether a word is a palindrome. 1 | BEGIN PalindromeCheck(word, palindrome) 2 | palindrome = TRUE 3 | F=1 4 | N = number of letters in word 5 | L=N 6 | REPEAT th | th 7 | IF F letter of word is not equal to L letter of word THEN 8 | palindrome = FALSE 9 | END IF 10 | L = L–1 11 | F = F+1 12 | UNTIL F > N 13 | RETURN palindrome 14 | END PalindromeCheck There are no errors in the code fragment. Explain the effect of changing line 12 to the following code. 12 | UNTIL F > N/2 OR palindrome = FALSE
34. 4 marks SQL
Below is the Issues table for a technical support company. FixTime, in minutes, is the time taken to complete each job. [table image not extractable: columns include JobID, Category, Status, FixTime] Construct a SQL query that displays: the number of pending software jobs; the number of pending hardware jobs; the number of escalated software jobs; the number of escalated hardware jobs. List the results in order from the highest to lowest, based on the number of jobs. (4 marks)
35. 4 marks Extended response
A software company is developing a system that will require a large development | 4 team. They have decided to use their own developers, and hire additional contract programmers when necessary. Explain how various types of documentation can be used by the contract programmers to enable them to quickly contribute to the project.
36. 5 marks Extended response
An online medical database stores the medical history of patients. It is updated each time a person seeks medical treatment. (a) | Give TWO reasons why security is important for this database. | 2 (b) | To provide increased security for the database, two-step authentication is | 3 implemented which requires a user to: • provide a valid username and password • enter an automatically generated six-digit verification code which is sent to their mobile phone. Complete the system flowchart for this two-step authentication process. UserID and password
37. 5 marks Python / code
[Exact question wording is not published as a paper (online exam). Task as shown by the NESA marking guidelines/mapping grid: Python program: generate 15 unique random numbers from 1 to 25 and print a 5 by 5 grid, with an X in each grid position whose number is in the list and a blank otherwise. Task inferred from the MG sample answer; the exact stem is not published as text]
38. 6 marks Extended response
An algorithm was designed to remove repeating consecutive characters in a phrase, replacing them with a single character. The algorithm: • allows input of a phrase • removes repeated characters • displays the shortened phrase. For example, if the input is ‘aaaabbbaa’ the output will be ‘aba’. Note: The function right (m, n) gets the last n characters of m. There are errors in the algorithm. 1 BEGIN Shorten 2 | input phrase 3 | phrase = phrase + “X” | ‘Adds an X to the end of phrase 4 | Len = number of characters in phrase 5 | NewPhrase = “ ” 6 | REPEAT 7 | done = FALSE 8 | NewPhrase = NewPhrase + 1st character of phrase 9 | REPEAT 10 | IF 1st character of phrase does not equal 2nd character of phrase THEN 11 | done = TRUE 12 | ENDIF 13 | Len = Len - 1 14 | phrase = right (phrase, Len) 15 | UNTIL done = TRUE 16 | UNTIL Len < 1 17 | output phrase 18 | phrase = NewPhrase 19 END Shorten (a) | Perform a desk check of the algorithm using dddg as input. | 3 (b) | Identify and correct any logic errors in the algorithm. You may refer to line | 3 numbers in your response.
39. 10 marks Extended response
In some areas, drivers need to use an app on their phone to pay for parking. This app allows the driver to: • create an account using their car registration number and banking details • start and end each parking session by pressing START and END buttons • pay for parking using the stored banking details. For each parking session, the app records the start and end times, calculates the cost of parking, accepts payment and stores the details remotely. The cost of parking is calculated using the hourly rate and the time spent. The hourly rate is determined by the location of the car. (a) | Construct an IPO diagram for the module that calculates the cost of parking. | 3 (b) | Construct a data flow diagram (DFD) to document the complete app as | 4 described. (c) | Describe how the developer might have addressed ONE inclusivity concern and | 3 ONE privacy concern associated with the use of this app.
Marking guidelines and sample answers
1. A · Representative data plus ongoing evaluation and diverse development teams reduce harmful bias.
2. A · Excessive data exposure and weak access control are common API vulnerabilities (cf. 2025 HSC Q5). Also use rate limiting and validate input.
3. A · GROUP BY House counts students per house: Blue (Ben, Cleo) = 2, Red (Ava, Dan, Eli) = 3.
4. C · Binary search repeatedly halves a sorted list. Linear search works on any list.
5. A · Hardening reduces the attack surface: remove what you do not need, change defaults, apply patches, tighten permissions.
6. A · Metadata describes data (author, date, size, location). Data mining is a separate idea: finding patterns in large data sets.
7. C · Collecting the minimum and deleting data on a schedule is privacy built into the system by default.
8. C · SMTP sends/transfers email. POP3 and IMAP retrieve it. (2025 sample exam Q2 asked what SMTP is.)
9. B · Code review is the manual examination of source code by peers. It can catch vulnerabilities and improve quality.
10. B, E · NESA answer: protecting sensitive data from unauthorised access; ensuring applications meet legal and industry standards.
11. A · Test boundaries on both sides of each limit (12/13 and 18/19), plus a typical value.
12. B · PWAs use service workers (plus a web app manifest for installability) to cache assets and data.
13. A, B, F · Logistic regression handles yes/no classification. House prices, height v weight and rate of spread are continuous numeric predictions (linear/polynomial regression). Stem wording not published by NESA.
14. A · Public key encrypts, private key decrypts (for confidentiality). Hashes are one way and cannot be reversed.
15. A · After append the list is [3, 8, 5, 1]; sort gives [1, 3, 5, 8]. values[-1] is the last item, 8, and the length is 4.
16. B · Specificity: id selectors beat class selectors, which beat element selectors. So #intro wins.
17. C · Weak password rules and unlimited guessing make authentication easy to break. The other options are good controls.
18. A · NESA answer key: A. REPEAT ... UNTIL (x<=5 OR y=8) continues while NOT(x<=5 OR y=8) = x>5 AND y<>8, and the body runs at least once. Old syllabus (SDD): useful as overlap practice only.
19. A · Inheritance represents an 'is-a' relationship, drawn from subclass to superclass with a hollow triangle head. 2025 Q22 required inheritance symbols and multiplicity.
20. D · Encapsulation bundles data with the methods that operate on it and restricts direct access.
Question 21 (1 marks)
Criteria
1: Identifies the correct answer.
Sample answer
Documenting the needs and constraints of the software
Question 22 (1 marks)
Criteria
1: Correctly matches each characteristic to the appropriate approach.
Sample answer
(1) ORM only. (2) Both ORM and SQL. (3) ORM only.
Question 23 (1 marks)
Criteria
1: Identifies the correct answer.
Sample answer
Ensuring that parties exchanging information are who they claim to be
Question 24 (1 marks)
Criteria
1: Identifies the correct item from each dropdown.
Question 25 (1 marks)
Criteria
1: Identifies the correct item from each dropdown.
Sample answer
Dropdown 1: Waterfall. Dropdown 2: Agile.
Question 26 (2 marks)
Criteria
2: Correctly classifies all the strategies. 1: Correctly classifies THREE strategies, which must include ONE SAST and ONE DAST.
Sample answer
SAST: (2) and (5). DAST: (1), (3) and (4).
Question 27 (3 marks)
Criteria
[Question 30] Criteria | Marks • Provides a substantially correct algorithm that addresses the following features: – Display menu screen – Get a non-zero ButtonClick – Perform correct subroutine – Loop until Quit (9) is selected • Provides an algorithm that attempts to address some of the features | 2 • Demonstrates some understanding of the problem | 1
Sample answer
Sample answer: BEGIN Menu REPEAT Display MenuScreen REPEAT Get ButtonClick UNTIL ButtonClick <> 0 CASEWHERE ButtonClick is 1 | : Screen1 2 | : Screen2 3 | : Screen3 4 | : Screen4 Otherwise : | Quit ENDCASE UNTIL ButtonClick = 9 END Menu
Question 28 (3 marks)
Criteria
3: Outlines relevant social and ethical issues. 2: Outlines ONE social or ethical issue OR identifies relevant issues. 1: Identifies ONE relevant issue.
Sample answer
The website will need to ensure payment and address data is appropriately secured and accessible only to authorised personnel. It also needs to ensure that pages can be viewed in a wide variety of languages and that the information about dishes displayed is accurate and representative of the product.
Question 29 (3 marks)
Criteria
3: Shows thorough understanding of how the effects of human bias on training can be minimised. 2: Outlines some effects of human bias on ML OR features of training. 1: Some relevant information.
Sample answer
Training data is initially selected by humans, who may unintentionally introduce their own biases. To minimise this, ensure that training data is representative of the problem the ML model will address. Reviewing data by individuals from diverse backgrounds could identify and reduce potential biases, ensuring fairer and accurate model performance.
Question 30 (3 marks)
Criteria
3: ALL dropdowns correct. 2: FIVE correct. 1: THREE correct.
Question 31 (3 marks)
Criteria
3: Explains how load time can be improved using a PWA. 2: Outlines some features of a PWA and/or issues affecting load time. 1: Some relevant information.
Sample answer
A progressive web app (PWA) can improve load times by pre-caching important resources, allowing files such as image-gallery.js and video-gallery.js to be loaded into memory or cache while the rest of the page loads. PWAs also use service workers to cache resources, ensuring faster load times on repeat visits and offline functionality. Background synchronisation and background fetching can update content in the background, so users see the latest information without slowing down the initial load.
Question 32 (3 marks)
Criteria
3: Substantially correct pseudocode that includes at least ONE subroutine. 2: Addresses some of the requirements. 1: Some understanding of the problem.
Sample answer
BEGIN main Get num_pizzas total_cost = 0 FOR i = 1 TO num_pizzas Get pizza_size Get num_toppings cost_per_pizza = calculate_pizza_cost(pizza_size, num_toppings) DISPLAY cost_per_pizza total_cost = total_cost + cost_per_pizza NEXT i DISPLAY total_cost END main
BEGIN calculate_pizza_cost(size, num_toppings) base_price = 10 topping_price = 1.5 IF size = "Medium" THEN base_price = base_price + 2 ELSEIF size = "Large" THEN base_price = base_price + 4 ENDIF pizza_cost = base_price + num_toppings * topping_price RETURN pizza_cost END calculate_pizza_cost
Question 33 (3 marks)
Criteria
[Question 27] Criteria | Marks • Provides correct explanations for BOTH modifications | 3 • Provides a correct explanation for ONE modification | 2 • Demonstrates some understanding of the algorithm | 1
Sample answer
Sample answer: UNTIL F>N/2 – once the process has reached halfway, the same checks would be repeated unnecessarily. Adding ‘OR palindrome = FALSE’ – there is no need to keep checking once a non-matching letter is found. In both cases, the loop can be exited early, improving efficiency.
Question 34 (4 marks)
Criteria
4: Correct SQL query that extracts 'Pending' and 'Escalated' jobs for the 'Software' and 'Hardware' categories, counts the jobs for each status in each category, and outputs results in descending order. 3: Addresses most requirements. 2: Some understanding of the problem. 1: Some understanding of SQL or the problem.
Sample answer
SELECT Category, Status, COUNT(JobID) AS Jobs FROM Issues WHERE (Status = 'Pending' OR Status = 'Escalated') GROUP BY Status, Category ORDER BY Jobs DESC
Question 35 (4 marks)
Criteria
[Question 25] Criteria | Marks • Explains the use of various types of documentation by the contract programmer • Describes a number of relevant types of documentation OR | 3 • Explains the use of ONE type of documentation • Outlines some relevant types of documentation | 2 • Provides some relevant information | 1
Sample answer
Sample answer: By referring to technical documentation such as DFDs, algorithms and structure charts, the contract programmer can familiarise themselves with how their particular module fits into the overall project. They can read existing source code to see the purpose of various modules and lines of code. This allows them to make necessary changes to ensure the new code is compatible with the existing code. A Gantt chart can be used to see the expected timing for their allocated tasks so they can plan their workflow. A data dictionary can be referred to, to confirm the use of particular variables.
Question 36 (5 marks)
Criteria
[Question 23 (a)] Criteria | Marks • Provides TWO reasons for the importance of security of this database | 2 • Demonstrates some understanding of the importance of data security | 1 Criteria | Marks • Provides a substantially correct system flowchart for the authentication process, using appropriate symbols • Provides a partially correct system flowchart | 2 • Provides a diagram that shows some understanding of the process | 1
Sample answer
Sample answer: Unintentional/malicious changes to the data may cause harm to the patients. Privacy of the patient may be compromised if the data is made public.
[Question 23 (b)] Sample answer:
Question 37 (5 marks)
Criteria
5: Correct Python program that creates a list of unique randomly generated numbers; processes the list correctly; uses selection and looping structures; provides correctly formatted output; uses inbuilt Python functions. 4: Substantially correct, most requirements. 3: Some requirements. 2: One requirement. 1: Some understanding of the problem.
Sample answer
import random
randList = [] for x in range(15): nextInt = random.randint(1,25) while nextInt in randList: nextInt = random.randint(1,25) randList.append(nextInt)
pos = 0 while pos < 25: if pos in randList: print ("| X", end=" ") else: print ("| ", end=" ") pos = pos + 1 if (pos % 5 == 0): print("| \n")
Question 38 (6 marks)
Criteria
[Question 28 (a)] Criteria | Marks • Completes a substantially correct desk check | 3 • Completes a partially correct desk check | 2 • Shows some understanding of desk checking this algorithm | 1 Criteria | Marks • Correctly identifies two errors and changes the code | 3 • Identifies two errors or corrects one error | 2 • Show some understanding of the algorithm | 1
Sample answer
Sample answer: phrase | Len | NewPhrase | done | output dddg dddgX | 5 | "" | F d ddgX | 3 dgX | T gX | F dg T X | F dgX Error message? At this point the algorithm is trying to compare X with a character that doesn’t exist.
[Question 28 (b)] Sample answer: Line 16 becomes UNTIL Len < = 1. Swap lines 17 and 18.
Question 39 (10 marks)
Criteria
[Question 24 (a)] Criteria | Marks • Constructs a correct IPO diagram for this module | 3 • Constructs a partially correct IPO diagram | 2 • Provides some relevant information | 1 Criteria | Marks • Constructs a substantially correct data flow diagram that includes processes, data flows, storage and external entities • Constructs a data flow diagram that is relevant to the parking app and includes an external entity and most of the processes and data flows • Constructs a data flow diagram with some elements relevant to the parking app • Shows a basic understanding of data flow diagrams | 1 Criteria | Marks • Describes actions that address an inclusivity issue AND a privacy issue for this system • Outlines an action that addresses an inclusivity issue OR a privacy issue | 2 • Shows some understanding of inclusivity or privacy issues | 1
Sample answer
Sample answer: I | P | O Location | Determine rate | Rate Start_time | Cost = (End_time − Start_time)* Rate | Cost End_time Rate
[Question 24 (b)] Sample answer:
[Question 24 (c)] Sample answer: Drivers may use a range of devices. This is an inclusivity issue that the developer could have addressed by ensuring that this new system is available across all common platforms and screen sizes. A privacy concern arises if unauthorised people access the generated data about drivers’ movements. The developer could have implemented a security process that guards against external access to the stored banking details.