TK Study

Past questions › sdd2023-q30

2023 3 marks Extended response The Software Engineering Project (Year 12) Algorithm design (menu)

NESA 2023 HSC Software Design and Development (OLD syllabus) - Section II Question 30, with NESA Marking Guidelines

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.

Marking 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 page · Practise and get marked