Pseudocode
Official guidance from the syllabus:
Pseudocode does not have a standard format and varies between programmers; however, algorithms must be able to be understood by anyone independent of a particular programming language. When students use pseudocode, they should:
- implement the basic control structures of assignment, sequence, selection, condition, iteration and modularisation using capitalised keywords associated with the constructs
- indent algorithmic steps where appropriate
- consider a case style that works best with the programming language they will be using in their project, e.g. Pascal Case or Camel Case.
The following pseudocode demonstrates examples of assignment (DECLARE), sequence, condition (IF), selection (THEN), iteration (WHILE), modularisation (FUNCTION, CALL), indentation and two variations of case (UserLogin, userName) for a user authentication
process:
Password DB Example - Pseudocode
Login
|
4-7: Keep asking the user for a password if it is wrong.
10: Create a function to make the code more modular.
12-15: Connect to the database and see if the password is in the database.
16: If a record is returned from the database, then it means that the correct password was entered so true is returned. |
List Password
|
4: This is a method that will clear all old passwords information from the UI.
6-8: Add new headings.
10: get the data from the database.
11-14: Add the information to the UI.
16: Function to make the core easier to maintain.
18-21: connect to the database and get the information from the database about users. |
Update Password
|
3-9: Make sure that the data has been validated.
13: Function to make the core easier to maintain.
15-18: connect to the database and update the data. |