gwenca.wordpress.
com
Chapter 11 : Programming
01 Constants and variables pseudocode declaration
• Example:
02 IF statements
03 CASE statements
gwenca.wordpress.com 1
gwenca.wordpress.com
04 Loops
05 Repeat loop
06 While loop
gwenca.wordpress.com 2
gwenca.wordpress.com
07 For loop
08 Procedures
gwenca.wordpress.com 3
gwenca.wordpress.com
09 Methods of passing parameters
• By value - does not change
• By reference - changed by procedure
10 Functions
gwenca.wordpress.com 4
gwenca.wordpress.com
11 An appropriate way of indicating an unused array element
• Assign a value outside the normal range to one of the 9ields
12 Parameter passing method
• By reference:
- A pointer to address of the variable is passed
- Original variable is changed when parameter changed in called module
• By value:
- A copy of the variable itself is passed
- Original variable not changed when parameter changed in called module
13 Explain how the use of constants helps to minimise programming errors
• The value cannot accidentally get changed
• A change to the value requires changing in one place only
14 Why the use of library routines helps to minimise the risk of errors when
writing a program
• Tried and tested
15 Programming is sometimes referred to as a transferable skill.
Explain how transferable skills would help you work on the program.
(asked to use a language you are not familiar with)
• Able to recognise / understand in another language:
- Declaration / assignment / selection / repetition
16 Explain why a programmer would be able to understand a program that uses
a language that he is not familiar with
• He would use his transferrable skills to understand the new program
• He could recognise basic control structures in the language (e.g. loops,
declaration, ...)
• He could read the comments / meaningful variable names
17 Why a high-level language program must be translated before it can be run
• Code has to be in machine code to be executed
gwenca.wordpress.com 5
gwenca.wordpress.com
18 Describe how programs are developed using a text editor and a compiler.
Include terms 'object code' & 'source code' in description.
• Create the source code using text editor
• Compiler translates the source code
• Compiler produces the object code
19 Pieces of information that the identifier table should contain other than the
identifiers name
20 Shuffle mechanism
gwenca.wordpress.com 6
gwenca.wordpress.com
21 Advantages of using subroutines in programs
gwenca.wordpress.com 7