General Instructions
• Reading time – 5 minutes
• Working time – 1 hour and 30 minutes
Total marks: 60
• Attempt Questions 1-30
• Allow 1 hour and 30 minutes to attempt the questions
Question 1 (1 mark)
Which of these is NOT a feature of the Agile development approach?
Question 2 (1 mark)

What system modelling tool is represented by the symbols?
Question 3 (1 mark)
Which of the following only contains primitive data types?
Question 4 (1 mark)
Consider the following Python code:
class Animal:
def __init__(self, name):
self._name = name
def make_sound(self):
raise NotImplementedError("Subclass must implement method")
class Dog(Animal):
def make_sound(self):
return "Woof"
class Cat(Animal):
def make_sound(self):
return "Meow"
def describe_animal(animal):
print(f"{animal._name} says {animal.make_sound()}")
dog = Dog("Buddy")
cat = Cat("Whiskers")
describe_animal(dog)
describe_animal(cat)
Which of the following statements is correct?
Question 5 (1 mark)
Which of the following best describes the facade design pattern in object-oriented programming?
Question 6 (1 mark)
Which of the following concepts in object-oriented programming refers to the bundling of data and methods within a single unit?
Question 7 (1 mark)

The crane shown is used to move containers off ships and onto trucks. The crane has how many degrees of freedom?
Question 8 (1 mark)
What is the function of resistors in an electrical circuit?
Question 9 (1 mark)
Which of the following statements represents an Assembly language statement?
Question 10 (1 mark)
What control structures are present in the following flowchart algorithm?
Question 11 (1 mark)
You are evaluating the following Python code. The code is intended to verify user credentials and handle login attempts.
def login(username, password):
# Dummy user credentials
stored_username = "admin"
stored_password = "password123"
if username == stored_username and password == stored_password:
return "Login successful"
else:
return "Invalid credentials"
# Example usage
print(login("admin", "password123")) # Expected output: Login successful
print(login("user", "pass")) # Expected output: Invalid credentials
Which of the following statements are correct regarding the effectiveness of this code implementation?
Question 12 (1 mark)
Which of the following are features of closed loop control systems?
Question 13 (1 mark)
Match each set of data to the most appropriate data structure.
| Stack | File | 2D Array | Record | Tree | Array | |
|---|---|---|---|---|---|---|
| Details for a single student (such as name and date of birth) | ||||||
| Average daily temperatures across a month | ||||||
| High score data for a game | ||||||
| File directory structure in a computer | ||||||
| Sequence of operations performed by a calculator | ||||||
| The squares on a chessboard |
Question 14 (1 mark)
Match the description with the corresponding type of testing.
| White box testing | Grey box testing | Black box testing | System testing | Subsystem testing | Unit testing | |
|---|---|---|---|---|---|---|
| Testing the software with no knowledge of the internal workings or structure, focusing only on the outputs in response to selected inputs | ||||||
| Testing the software with partial knowledge of the internal workings, often used to design test cases while having an understanding of the code or logic | ||||||
| Testing individual components or modules of a system in isolation to ensure they work correctly | ||||||
| Testing the complete and integrated system to evaluate the system's compliance with its specified requirements | ||||||
| Testing the software with full knowledge of the internal workings, focusing on the flow of inputs and outputs through the code, ensuring all paths are tested | ||||||
| Testing a combination of integrated modules or components to verify interactions between them |
Question 15 (1 mark)
1 | ![]() |
2 | ![]() |
3 | ![]() |
4 | ![]() |
5 | ![]() |
6 | ![]() |
7 | ![]() |
Match each electronics symbol with the correct name.
| Diode | One way switch | Capacitor | Motor | Lightbulb | Resistor | Two way switch | LED | Amplifier | |
|---|---|---|---|---|---|---|---|---|---|
| 1 | |||||||||
| 2 | |||||||||
| 3 | |||||||||
| 4 | |||||||||
| 5 | |||||||||
| 6 | |||||||||
| 7 |
Question 16 (2 marks)
Is a structured approach more suited to the development of large, critical software systems? Justify your response.
Question 17 (2 marks)
Describe the purpose of the testing stage of software development.
Question 18 (3 marks)
Distinguish between syntax and logic errors, providing an example of each.
Question 19 (3 marks)
def findMaximum(numbers):
max_value = numbers[0]
for num in numbers:
if num > max_value:
max_value = num
else:
max_value = numbers[0]
return max_value
Perform a desk check of the Python code provided, when numbers = [2, 4, 8, 6].
Question 20 (5 marks)
A 'magic square' is a grid with a width and height of n, containing the numbers from 1 to n². Each row, column, and diagonal adds up to the same sum. For example, in the grid below, n is 3; the grid contains the numbers 1–9, and every row, column, and diagonal adds up to 15.

Write an algorithm in pseudocode for a function which, when passed a 2D array of integers called "square", will return True if the square is "magic" and False otherwise.
Question 21 (2 marks)
Describe ONE technique for optimising code performance.
Question 22 (2 marks)
Describe how version control systems support collaborative code development.
Question 23 (3 marks)
Contrast top-down design and bottom-up design in software development.
Question 24 (3 marks)
You are part of a development team working on a project to create a new feature for a library management system. The feature involves implementing a user interface for managing book reservations. The system should include functionalities for reserving, cancelling, and viewing reservations.
Write a task definition for the book reservation feature. Include the objective, functional and non-functional requirements, constraints, and acceptance criteria.
Question 25 (5 marks)
Consider the following class diagram which models an employee management system:

You can assume:
- The display_info() method prints the properties of the object created from that class.
- The Manager has a property called subordinates which stores an array of Employee objects representing the employees who report to that manager.
- The add_subordinate() method adds a given Employee object to the subordinates property of that Manager object.
- You do not need to enforce the relationship cardinalities (1..1, 1..*) between Employee and Manager objects.
Provide Python implementation for each of the Employee, Manager and Developer classes.
# Output
Question 26 (2 marks)
Describe one of the fields that make up Mechatronics.
Question 27 (2 marks)
An analogue to digital converter converts analogue signals to digital signals. Describe the process of converting analogue sound to digital.
Question 28 (3 marks)
Distinguish between sensors and actuators. Give an example of a sensor and an actuator in your answer.
Question 29 (3 marks)
Explain how Opcodes and Operands create a link between programmers and the CPU. Give an example of an assembly language statement in your answer identifying the Opcode and Operand.
Question 30 (5 marks)
Discuss how Mechatronics systems have changed the manufacturing industry over the last 20 years using examples.


.png)



