Published online by Cambridge University Press: 05 June 2012
In this chapter many kinds of diagram are discussed. They all show structure in some way. They may broadly be classified into program structure diagrams and data structure diagrams – but note that sometimes programs are data to other programs so the distinction is imprecise.
Diagrams used in the program development process
This section discusses the use of diagrams in the program development process.
There are many kinds of diagram and everyone has favourites. It is the intention of this chapter to demonstrate the usefulness of a disciplined approach to diagrams and to stress the similarities between kinds of diagrams rather than to advocate one particular diagramming technique above all others.
In computer programming, the main uses for diagrams are:
to show the flow of control in a program (= flowchart)
to show the structure of data (= data structure diagram), and
to show the structure of a programming language (= syntax diagram).
All these diagramming systems show structure in some way.
All the systems can be used intuitively and informally to organise initial ideas or they can be used formally as part of a disciplined design process.
In looking for the similarities rather than differences between different diagramming systems, the critical observation is that all systems have a way of showing
sequencing
selection
repetition
The diagram below shows the way these structure forms are drawn in three different diagramming systems.
To save this book to your Kindle, first ensure no-reply@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.
Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.
Find out more about the Kindle Personal Document Service.
To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.
To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.