TK Study

Software Engineering › Notes › Pseudocode, flowcharts and diagram rules

Pseudocode, flowcharts and diagram rules

Pseudocode rules

Control structures in HSC pseudocode

IF condition THEN
    process 1
ELSE
    process 2
ENDIF
CASEWHERE expression evaluates to
    choice a: process a
    choice b: process b
    OTHERWISE: default process
END CASE
IF condition A THEN
    process 1
ELSE
    IF condition B THEN
        process 2
    ELSE
        process 3
    ENDIF
ENDIF
WHILE condition is true
    process
ENDWHILE
REPEAT
    process
UNTIL condition is true
FOR variable = start TO finish STEP increment
    statements
NEXT variable
BEGIN AddNumbers
    FOR i = 1 TO 5
        Add (i, i + 1, sum)
        Display sum
    NEXT i
END AddNumbers

BEGIN Add (x, y, total)
    total = x + y
END Add (x, y, total)
BEGIN Add (x, y)
    total = x + y
    RETURN total
END Add (x, y)

Worked pseudocode: RiskRating (2025 Q17 style)

BEGIN RiskRating
    SET total = 0
    FOR i = 1 TO 10
        total = total + scores[i]
    NEXT i
    IF total > 35 THEN
        rating = "High"
    ELSE
        IF total < 20 THEN
            rating = "Low"
        ELSE
            rating = "Medium"
        ENDIF
    ENDIF
    Display rating
END RiskRating
BEGIN FindLargest
    largest = list[1]
    FOR i = 2 TO length
        IF list[i] > largest THEN
            largest = list[i]
        ENDIF
    NEXT i
    Display largest
END FindLargest

Flowchart rules

Drawing rules: DFD, structure chart, storyboard, decision tree, class diagram, ERD

Part 2. School notes (Canvas, 12SENX2) by syllabus dot point

Corrections are marked in the text. Anything not marked is the school wording.

IPO

Input Process Output

Structure Chart

Structure charts are used to model the relationship between modules within a system. Using a hierarchical format, they can map the sequence of processes, data movement, and control parameters for interpretation. A structure chart can represent the control structure of sequence, selection, and iteration.

Key Points

Symbol

Psuedocode Flowchart
IF condition A THEN
process 1
ELSEIF condition B THEN
process 2
ELSEIF condition C THEN
process 3
ELSE
process 4
ENDIF
CASEWHERE expression evaluates to
choice a: process a
choice b: process b
...
OTHERWISE: default process
END CASE
WHILE condition is true
process
ENDWHILE
REPEAT
process
UNTIL condition is true
FOR variable = start TO finish STEP inc
statements
NEXT variable

Data Flow Diagram

Always label data flow

Level 0 Data Flow should only have one Process named “___ System”

Desk Check

Line number Input Var1 VarI Output

Blank for non-instantiation

Fill for all instantiated variables regardless of if it has been changed within the line.

Part 3. Where this has been examined (see ../../question_bank.md)

ID Marks Source Topic / type
hsc2025-q15a 3 2025 HSC Data dictionary (dropdown (data dictionary))
hsc2025-q17 3 2025 HSC Algorithm design (pseudocode)
hsc2025-q22 3 2025 HSC Modelling tools (drawing (class diagram))
sample-q7 1 Sample Exam Python to pseudocode (multiple choice)
sample-q10 2 Sample Exam Structure charts (multi-select (structure chart))
sample-q14 3 Sample Exam Algorithm design (subroutines) (pseudocode)
sample-q20b 3 Sample Exam Decision trees (drawing (decision tree))
sample-q24 4 Sample Exam Modelling tools (class diagram) (drawing (class diagram))
fam-q4 2 Familiarisation Structure charts (multi-select (structure chart))
fam-q7b 3 Familiarisation Decision trees (drawing (decision tree))
fam-q8 3 Familiarisation Algorithm design (linear search) (pseudocode (fix algorithm))
fam-q9a 3 Familiarisation Prototype and user interface design (drawing (user interface))
sdd2022-q27 10 Old SDD (old syllabus) Modelling and design (IPO, data structure, Gantt) (extended)
sdd2023-q21 2 Old SDD (old syllabus) Prototypes (short answer / extended)
sdd2024-q24 10 Old SDD (old syllabus) Social and ethical issues (extended)