13.07.2015 Views

Software Design 2e - DIM

Software Design 2e - DIM

Software Design 2e - DIM

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

If anything, pseudocode is used rather too much, as the low level of abstractionthat it provides tends to conceal the wood within the trees as far as design abstractionis concerned. Perhaps some of its attraction lies in the ease with which it can be maintainedusing an ordinary computer terminal and keyboard.That said, the level of abstraction that it provides is an important one, in that itpermits a designer to think about the detailed sequencing of a solution while stillremaining distant from the detailed forms of the solution. However, in order to do thiseffectively, it is necessary to ensure that pseudocode does not become too much like theprogramming language!Pseudocode formLike the Structure Diagram that was described in Section 7.3.1, pseudocode is concernedwith describing a solution in terms of sequence, although it is restricted todescribing the sequencing of operations alone. Figure 7.34 shows a typical exampleof this role, and expands upon the tea-making example of the previous section. Figure7.35 shows a more typical example of the use of pseudocode for program design.To be effective, there are some useful rules of thumb for writing pseudocode. Theprincipal ones (as illustrated in the example of Figure 7.35) are:167White box notationsnUse indentation to emphasize structure (it aids the eye in following the form of asequence and finding other nodes in a branch).Figure 7.34The use of pseudocode to describe an algorithm.Figure 7.35The use of pseudocode to describe the structure of a program unit.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!