HSC Software Design & Development 2023
HSC Software Design & Development 2023
1170
Section I
20 marks
Attempt Questions 1–20
Allow about 35 minutes for this section
1 Which of the following is a valid reason to include comments in the source code?
2 Which of the following tools can be used to perform tasks such as version control and
test data generation?
A. CASE tools
B. Documentation tools
C. System debugging tools
D. Project management tools
3 Which of the following is NOT a typical use of a logbook during software development?
–2–
4 While developing software, a programmer uses a compiler prior to execution.
Which row of the table correctly matches a type of error with the stage at which it may
be detected?
A. 2B2B2$
B. B1A9$%
C. F12B2
D. Y9Z9Z%
–3–
7 Consider the following code.
BEGIN Main
Num is local
Num = 4
Sub2
print Num
END Main
BEGIN Sub2
Num is local
Num = 4
Num = Num − 2
print Num
END Sub2
A. 2 2
B. 2 4
C. 4 2
D. 4 4
8 At which stage in the software development cycle is a developer most likely to consult a
railroad diagram?
A. Outsourcing
B. Customising
C. Decompilation
D. Reverse engineering
–4–
Use the following information to answer Questions 10−11.
Game scores for 1000 players are stored in memory. Details of the first three players are shown.
Name Score
Jones B 23
Poullos W 45
Cheng C 32
The following code finds and displays a score for a given player.
BEGIN
Get name
count = 1
WHILE count <= 1000
IF GameScore(count).Name = name THEN
Display GameScore(count).Score
ENDIF
count = count + 1
ENDWHILE
END
10 Which of the following best describes the data structure used in the code?
A. An array of strings
B. An array of records
C. A 1-dimensional array
D. A 2-dimensional array
Which of the following is the best way to modify the code to execute more efficiently?
–5–
12 Which of the following statements is true about error detection?
13 Which of the following conforms to the rules for constructing data flow diagrams?
A.
B.
C.
D.
–6–
14 Which of the following is a step of the fetch-execute cycle which involves the arithmetic
logic unit (ALU)?
A. Decode
B. Execute
C. Fetch
D. Translate
A. DoThis
WHILE x>5 AND Y< >8
DoThis
ENDWHILE
B. DoThis
WHILE x<=5 AND y=8
DoThis
ENDWHILE
C. DoThis
WHILE x<=5 OR y=8
DoThis
ENDWHILE
D. DoThis
WHILE x>5 OR Y< >8
DoThis
ENDWHILE
–7–
17 Consider this code fragment.
BEGIN ReadFile
Line = 101
s=0
OPEN ThisFile for INPUT
Read NextLine from ThisFile
WHILE NextLine < > Line AND s < 100
Array[s] = NextLine
s=s+1
Read NextLine from ThisFile
ENDWHILE
CLOSE ThisFile
END ReadFile
A. 0
B. 1
C. 99
D. 101
A. D A C S F
B. D C A S F
C. F D C A S
D. S D C A F
–8–
19 A programmer defined a variable called IF. This caused an error during compilation.
A. Lexical analysis
B. Code generation
C. Token generation
D. Syntactical analysis
Which of the following algorithms displays four different random integers from 1 to 100?
A. BEGIN B. BEGIN
FOR Index = 1 to 100 FOR Index = 1 to 100
Used(Index) = 0 Used(Index) = 0
NEXT Index NEXT Index
Count = 0 Count = 1
REPEAT REPEAT
Num = Random(100) REPEAT
IF Used(Num) = 0 THEN Num = Random(100)
Display Num UNTIL Used(Num) = 1
Used(Num) = 1 Display Num
ENDIF Used(Num) = 1
Count = Count + 1 Count = Count + 1
UNTIL Count = 4 UNTIL Count = 4
END END
C. BEGIN D. BEGIN
FOR Index = 1 to 100 FOR Index = 1 to 100
Used(Index) = 0 Used(Index) = 0
NEXT Index NEXT Index
Count = 0 Count = 1
REPEAT REPEAT
REPEAT Num = Random(100)
Num = Random(100) IF Used(Num) = 1 THEN
UNTIL Used(Num) = 0 Display Num
Display Num Used(Num) = 0
Used(Num) = 1 ENDIF
Count = Count + 1 Count = Count + 1
UNTIL Count = 4 UNTIL Count = 4
END END
–9–
BLANK PAGE
– 10 –
BLANK PAGE
– 11 –
BLANK PAGE
– 12 –
© 2023 NSW Education Standards Authority
2023 HIGHER SCHOOL CERTIFICATE EXAMINATION
Centre Number
60 marks
Attempt Questions 21–32
Allow about 1 hour and 50 minutes for this section
Do NOT write in this area.
Instructions • Write your Centre Number and Student Number at the top of this
page.
– 13 –
Office Use Only – Do NOT write anything, or make any marks below this line.
5638310365
1171 15360
BLANK PAGE
– 14 –
Office Use Only – Do NOT write anything, or make any marks below this line.
0589310365
Question 21 (2 marks)
.........................................................................................................................................
.........................................................................................................................................
.........................................................................................................................................
.........................................................................................................................................
Question 22 (3 marks)
Explain why it is important for developers to communicate with their clients. Refer to 3
specific stages of the software development cycle in your answer.
.........................................................................................................................................
Do NOT write in this area.
.........................................................................................................................................
.........................................................................................................................................
.........................................................................................................................................
.........................................................................................................................................
.........................................................................................................................................
.........................................................................................................................................
.........................................................................................................................................
– 15 –
Office Use Only – Do NOT write anything, or make any marks below this line.
1024310360
Question 23 (5 marks)
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
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
UserID and
password
– 16 –
Office Use Only – Do NOT write anything, or make any marks below this line.
5486310366
Question 24 (3 marks)
Outline TWO problems that may arise if the company decides to outsource the
development of one of these applications.
.........................................................................................................................................
.........................................................................................................................................
.........................................................................................................................................
.........................................................................................................................................
.........................................................................................................................................
.........................................................................................................................................
Question 25 (4 marks)
Do NOT write in this area.
Explain how features of their software help them maintain their market share.
.........................................................................................................................................
.........................................................................................................................................
.........................................................................................................................................
.........................................................................................................................................
.........................................................................................................................................
.........................................................................................................................................
.........................................................................................................................................
.........................................................................................................................................
.........................................................................................................................................
.........................................................................................................................................
.........................................................................................................................................
.........................................................................................................................................
– 17 –
Office Use Only – Do NOT write anything, or make any marks below this line.
7986310363
Question 26 (9 marks)
(a) Why is the Read statement needed in both line 9 and line 14? 2
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
– 18 –
Office Use Only – Do NOT write anything, or make any marks below this line.
0736310369
Question 26 (continued)
(b) Give TWO reasons why the code in the CustomerOrders module is easy to 3
maintain. Support your answer with examples from the module.
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
(c) The logic in the CustomerOrders module has been successfully tested with small 4
files of test data, and using stubs in lines 5, 12 and 18.
Do NOT write in this area.
The module is to be included in a larger system, with the stubs replaced with
existing subroutines that are known to work.
Explain why both module and system testing are now required.
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
End of Question 26
– 19 –
Office Use Only – Do NOT write anything, or make any marks below this line.
6277310365
Question 27 (10 marks)
Design a user interface for capturing these booking details, using appropriate
screen design elements.
Customers will be charged at an hourly rate, based on their actual entry and exit times.
When a customer arrives at the parking station, the car number plate will be scanned.
The system uses this to retrieve their booking record, and update it with the current
time. The boom gate then opens to allow entry.
On leaving the car park, the car number plate is scanned. The system retrieves the
booking record and calculates the cost using the hourly rate. The customer swipes
their credit card, their account is debited and the boom gates open.
(c) Describe how this system can be evaluated with reference to TWO quality 3
assurance criteria.
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
End of Question 27
– 21 –
Office Use Only – Do NOT write anything, or make any marks below this line.
0136310363
Question 28 (6 marks)
In a retail business, all product codes must start with an uppercase letter and then be
followed by one or more lowercase letters.
Note that Extract(string, start, N) returns N characters from a string, starting from
position start. Eg Extract(“Names”, 3, 2) returns “me”.
10 BEGIN validate
20 OK = “F”
30 Get ProductCode
40 Len = Number of characters in ProductCode
50 WHILE OK = “F” AND ProductCode < > “Q”
60 OK = “T”
– 22 –
Office Use Only – Do NOT write anything, or make any marks below this line.
7037310360
Question 28 (continued)
(a) Perform a desk check of the algorithm using the test data “p3”, “Pad”, “Q”, “X”. 3
Identify TWO errors and suggest how they can be corrected. Refer to line
numbers in your answer.
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
End of Question 28
– 23 –
Office Use Only – Do NOT write anything, or make any marks below this line.
2207310364
Question 29 (4 marks)
Construct railroad diagram(s) to define the syntax of valid expressions in this language.
You can assume that Digit (from 0 to 9), Variable and Operator (+, − , *, / ) are already
defined.
– 24 –
Office Use Only – Do NOT write anything, or make any marks below this line.
1619310360
Question 30 (3 marks)
The following storyboard shows the navigation for a simple menu structure. 3
MENU
Done Done
Screen 3 Screen 4
Screen 3 Screen 4
Quit
Done Done
Quit
Do NOT write in this area.
Write an algorithm for the menu screen that allows a user to access the other screens,
exiting when the Quit button is clicked.
.........................................................................................................................................
.........................................................................................................................................
.........................................................................................................................................
.........................................................................................................................................
.........................................................................................................................................
.........................................................................................................................................
.........................................................................................................................................
.........................................................................................................................................
.........................................................................................................................................
.........................................................................................................................................
.........................................................................................................................................
.........................................................................................................................................
.........................................................................................................................................
– 25 –
Office Use Only – Do NOT write anything, or make any marks below this line.
0585310361
Question 31 (3 marks)
Between the stages of compilation and execution, the process of linking occurs. 3
.........................................................................................................................................
.........................................................................................................................................
.........................................................................................................................................
.........................................................................................................................................
.........................................................................................................................................
.........................................................................................................................................
– 26 –
Office Use Only – Do NOT write anything, or make any marks below this line.
6577310368
Question 32 (8 marks)
The entered date will always be 10 characters and in the format DD/MM/YYYY.
(a) Complete the table with THREE items of test data that test different aspects of 3
the logic of the algorithm.
– 27 –
Office Use Only – Do NOT write anything, or make any marks below this line.
4074310368
Question 32 (continued)
(b) Design an algorithm to validate a date in the form DD/MM/YYYY and output the 5
equivalent long date, eg 29 October 2023.
Include all meaningful error messages to assist the user to understand why their
entered date is not valid.
You may use the following two library routines in your pseudocode:
• Extract(string, start, N)
eg Extract(“Names”, 3, 2) returns “me”
• Value(string) converts a string to its numerical value
eg Value(“42”) returns 42.
You may use the following two arrays (indexed from 1) in your pseudocode.
MonthName DaysinMonth
January 31
– 28 –
Office Use Only – Do NOT write anything, or make any marks below this line.
9566310369
Question 32 (continued)
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
Do NOT write in this area.
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
End of Question 32
– 29 –
Office Use Only – Do NOT write anything, or make any marks below this line.
0008310361
Section II extra writing space
If you use this space, clearly indicate which question you are answering.
– 30 –
Office Use Only – Do NOT write anything, or make any marks below this line.
8952310367
Section II extra writing space
If you use this space, clearly indicate which question you are answering.
Do NOT write in this area.
– 31 –
Office Use Only – Do NOT write anything, or make any marks below this line.
2306310364
Section II extra writing space
If you use this space, clearly indicate which question you are answering.
Office Use Only – Do NOT write anything, or make any marks below this line.
2770310369
1172 15360 5499310056
Centre Number
Software Design and
Development
Student Number
Section III
20 marks
Attempt either Question 33 or Question 34
Allow about 35 minutes for this section
Answer the question in the spaces provided. These spaces provide guidance for the expected
length of response.
If you include diagrams in your answer, ensure that they are clearly labelled.
– 33 –
Question 33 — Programming Paradigms (20 marks)
(a) A system is required to allow users to compare cities based on their crime level
and population.
The following facts have been defined using the logic paradigm.
gpop(a_city, b_city) which means a_city has a greater population than b_city
hcrime(a_city, b_city) which means a_city has a higher crime rate than b_city
A rule called Better_City returns TRUE if a city has a higher population and lower
crime rate than another city.
(i) What additional fact(s) need to be defined for Better_City to return the 2
result that f_city is a better city than g_city?
...................................................................................................................
...................................................................................................................
...................................................................................................................
...................................................................................................................
(iii) Explain why it is more appropriate to develop this system using the logic 3
paradigm rather than the imperative paradigm.
...................................................................................................................
...................................................................................................................
...................................................................................................................
...................................................................................................................
...................................................................................................................
...................................................................................................................
...................................................................................................................
...................................................................................................................
...................................................................................................................
...................................................................................................................
...................................................................................................................
– 34 –
8287310054
Question 33 (continued)
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
(c) A programmer has been asked to develop a module for a large project. 4
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
– 35 –
BLANK PAGE
– 36 –
© 2023 NSW Education Standards Authority
1173 15360 8329310040
Centre Number
Software Design and
Development
Section III (continued) Student Number
Question 33 (continued)
Explain why using the OOP paradigm is appropriate for developing this
software. In your response, refer to relevant OOP concepts.
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
– 37 –
3146310042
Question 33 (continued)
(e) Robots are used to serve food in a restaurant. The food is placed on a shelf of 3
a robot and a table number is entered, which tells the robot where to take the
food.
Between the kitchen and the table, there are several obstacles, such as other
robots, customers, chairs and other tables that need to be navigated.
Explain how heuristics and goals could be used in the software system for these
robots.
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
End of Question 33
– 38 –
© 2023 NSW Education Standards Authority
1174 15360 8543310116
Centre Number
Software Design and
Development
Section III (continued) Student Number
Hexadecimal Binary
representation representation
B 1011
00011110
Perform the following binary multiplication, showing all working and clearly
indicating where the shifting occurs.
110110 × 101
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
– 39 –
Question 34 (continued)
Compare the use of these representations for storing very large and very small
numbers.
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
– 40 –
5123310117
Question 34 (continued)
START
Get A, B, C
N
A = B?
Y
Y C = 0?
Output “0” N
Output “1”
FINISH
Draw a circuit with logic gates that will produce the same output as the
algorithm. You may use a truth table to assist you.
– 41 –
BLANK PAGE
– 42 –
© 2023 NSW Education Standards Authority
1175 15360 1158310201
Centre Number
Software Design and
Development
Section III (continued) Student Number
Question 34 (continued)
(e) Six robots are used to serve food in a restaurant. The food is placed on a shelf
of a robot and a table number is entered.
(i) If the robot senses an obstacle in its path, it stops and sends a data stream 3
to the controller. The controller then sends a stream to the robot causing
a warning beep to sound. The warning beep sounds until a staff member
presses a switch on the beeping robot.
A circuit inside the robot is needed to turn the beep on and keep it on
until turned off by the staff member.
Explain how a flip-flop can be used in this circuit. You may include a
labelled circuit with logic gates in your response.
...................................................................................................................
...................................................................................................................
...................................................................................................................
...................................................................................................................
...................................................................................................................
...................................................................................................................
...................................................................................................................
...................................................................................................................
Question 34 continues on page 44
– 43 –
Question 34 (continued)
The table numbers are stored in that array, indicating their location in the room.
5
3
1
2
4 6
When an order is ready, one of the six robots is selected to take the food to a
designated table.
The structure of the data stream sent from the controller to each robot has the
following format:
(ii) Write the binary data stream that sends Robot 5 to Table 4 using the 2
set-up shown.
...................................................................................................................
...................................................................................................................
– 44 –
3548310206
Question 34 (continued)
(iii) RobotID and TableNo have been determined for a particular order that is 4
ready for delivery. The module DirectRobot(RobotID, TableNo) generates
the data stream to send the robot with RobotID to the table TableNo.
You may use the function Bin(integer, n) which converts an integer to its
binary equivalent, using n bits.
...................................................................................................................
...................................................................................................................
...................................................................................................................
...................................................................................................................
...................................................................................................................
...................................................................................................................
...................................................................................................................
...................................................................................................................
...................................................................................................................
...................................................................................................................
...................................................................................................................
...................................................................................................................
...................................................................................................................
...................................................................................................................
...................................................................................................................
...................................................................................................................
...................................................................................................................
End of paper
– 45 –
BLANK PAGE
– 46 –
© 2023 NSW Education Standards Authority