We are working with Cambridge Assessment International Education towards endorsement of this title. Any references or material related to answers, grades, papers or examinations are based on the opinion of the author(s). 2 Algorithms
3
Algorithm 3 involves an iteration. A detailed design would need to specify how this should be implemented in the algorithm.
Figure 2.1 shows the stages of design leading to program coding. It shows that there are two techniques available for detailed design: pseudocode and flowcharts. Detailed design
LE
Pseudocode
Conversion possibly needed
Preliminary design
Flowchart
Writing program code
P
Figure 2.1: Stages of design leading to program coding
This section provides some comments about pseudocode and some details regarding flowcharts.
Pseudocode
M
Pseudocode is a way of representing the sequence and logic of a program using natural language words, a bit like Structured English but much more detailed. You can use pseudocode to provide a design that has all of the coding components that would be used in an actual programming language. Therefore, a design presented in pseudocode looks like a program code listing. The design can be understood by programmers of any language.
pseudocode: a way of unambiguously representing the sequence and logic of a program using both natural language and code-like statements.
S
A
This book will introduce examples of pseudocode in each of the following chapters alongside the corresponding Java code.
KEY WORD
11 Original material © Cambridge University Press 2021. This material is not final and is subject to further changes prior to publication.