# Criterion 5 Component Guide: IPO Charts and Pseudocode Functional logic design requires representing how your software solution processes data. In VCE Software Development, this is achieved using **Input-Process-Output (IPO) Charts** and **Pseudocode**. --- ## 1. Input-Process-Output (IPO) Charts An IPO chart provides a high-level conceptual overview of a specific system task. It identifies what data is needed (Input), the sequence of processes performed on that data (Processes), and the resulting information generated (Output). ### VCAA Formatting Rules: * Must be represented as a **three-column table** with headers: `Input`, `Processes`, and `Output`. * You must create **separate IPO charts** for separate, distinct tasks in your system (e.g., User Login, Sorting Records, Calculating Totals). Do not clump the entire system into one massive chart. ### Example: User Login Authentication Task | Input | Processes | Output | | :--- | :--- | :--- | | `txtInputEmail`<br>`txtInputPassword` | 1. Retrieve user credentials from user input controls.<br>2. Encrypt the entered password using SHA-256.<br>3. Query the `Users` database table using the email.<br>4. Compare the stored password hash with the encrypted password hash.<br>5. Determine authentication status and privileges. | Dynamic navigation to Dashboard (if authenticated).<br>Validation error message displayed on `lblEmailError` (if failed). | --- ## 2. Pseudocode Pseudocode is a detailed design tool for representing your algorithms using structured English. It is a step-by-step programming plan that sits between your IPO chart and your final OOP code. To achieve a score in the **High / Very High** bands, your pseudocode must strictly adhere to the VCAA conventions: ### VCAA Pseudocode Conventions: 1. **Block Enclosure:** Every pseudocode algorithm block must start with the keyword **`BEGIN`** and end with **`END`**. 2. **Keyword Formatting:** Reserved keywords must be **capitalised** and in **bold** (e.g., **`IF`**, **`WHILE`**, **`READ`**). 3. **Indentation:** You must use indentation to show scope, nesting, and hierarchy inside algorithms to enhance human readability. 4. **Assignment Symbol:** Values must be assigned to variables using the **left-pointing arrow ($\leftarrow$)** or the **`SET`** keyword. Avoid using a single equals sign (`=`), which is reserved for comparison. 5. **Input/Output Keywords:** * *Input:* **`READ`** or **`INPUT`**. * *Output:* **`PRINT`**, **`RETURN`**, or **`OUTPUT`**. 6. **Selection Structures:** * **`IF`** - **`THEN`** - **`ENDIF`** * **`IF`** - **`THEN`** - **`ELSE`** - **`ENDIF`** * **`IF`** - **`THEN`** - **`ELSEIF`** - **`ELSE`** - **`ENDIF`** * **`CASE`** / **`SWITCH`** - **`ENDCASE`** 7. **Iteration/Repetition Structures:** * **`WHILE`** - **`ENDWHILE`** (Pre-test loop) * **`FOR`** `i` **`TO`** `n` - **`ENDFOR`** (Counted loop) * **`REPEAT`** - **`UNTIL`** (Post-test loop) * **`DO`** - **`WHILE`** (Post-test loop) 8. **Logic Operators:** Use **`AND`**, **`OR`**, and **`NOT`** (in uppercase and bold) to join conditions. --- ## 3. High-Scoring Pseudocode Examples ### Example A: User Authentication Logic This algorithm validates credentials and handles user access. ```pascal BEGIN LoginUser // 1. Read input values from user interface controls READ txtInputEmail READ txtInputPassword // 2. Validate input existence IF txtInputEmail = "" OR txtInputPassword = "" THEN SET lblEmailError.Text <- "Fields cannot be blank." SET lblEmailError.Visible <- True RETURN False ENDIF // 3. Encrypt password and search database SET strHashedPassword <- HashSHA256(txtInputPassword) SET objUserRecord <- QueryUserDatabase(txtInputEmail) // 4. Authenticate User IF objUserRecord != Null AND objUserRecord.Password = strHashedPassword THEN SET boolIsLoggedIn <- True SET strCurrentUserRole <- objUserRecord.Role PRINT "Authentication Successful" RedirectToDashboard() ELSE SET lblEmailError.Text <- "Invalid email or password." SET lblEmailError.Visible <- True PRINT "Access Denied" ENDIF END LoginUser ``` ### Example B: Linear Search Algorithm This algorithm searches an array of student records for a target name. ```pascal BEGIN SearchStudentArray // Initialize search variables SET arrStudents <- GetStudentRecords() SET intLength <- Length(arrStudents) SET intIndex <- 0 SET boolFound <- False SET intMatchIndex <- -1 READ strSearchTarget WHILE intIndex < intLength AND boolFound = False IF arrStudents[intIndex].Name = strSearchTarget THEN SET boolFound <- True SET intMatchIndex <- intIndex ELSE SET intIndex <- intIndex + 1 ENDIF ENDWHILE IF boolFound = True THEN PRINT "Student found at record index " + intMatchIndex RETURN arrStudents[intMatchIndex] ELSE PRINT "Student record not found." RETURN Null ENDIF END SearchStudentArray ```