Below are some of the key terms from the textbook and class notes.
Structure:
A structure is a basic unit of programming logic.
Structure theorem:
It is possible to write any computer program by using only three basic control structures that are easily represented in pseudocode and flowcharting. These accepted structures are: Sequence, Selection, and Repetition.
Sequence:
With a sequence structure, you perform an action, and then you perform the next action in order. A sequence can contain any number of events, but there is no chance to branch off and skip any of the actions. Once you start a series of actions in a sequence, you must continue step-by-step until the sequence ends.
See an example
Back to Top
Selection (also known as "decision structure"):
The selection structure asks a question, and depending on the answer, you take one of two courses of action. Then, no matter which path you follow, you continue on with the next event.
See an example
Back to Top
Repetition (also known as "loop or iteration structure"):
In a repetition structure, you ask a question; if the answer requires an action, you perform the action and ask the original question again. If the question's answer requires that action be taken again, you perform the action and then ask the original question again. This process continues until the answer to the question is such that the action is no longer required and the structure is then exited.
See an example
Back to Top or Return to Objectives
Structured Programming:
Programming strategy that is based on the structure theorem and follows the constraints of modular design and top-down development.
Back to Top or Return to Objectives
Look at this reference page for structured programming concept.
IDENTIFYING STRUCTURE.
Determining whether programming logic is structured or unstructured is a matter of determing whether the flowcharting or pseudocode used to implement that logic has been constructured using the controls of sequence, selection, and repetition only.
Of course, your ability to differentiate structured from unstructured flowcharts and pseudocode depends on your ablility to recognize the controls structures in those tools. Look at the Identifying Structure page to help you learn the key charateristics of each control structure used in flowcharting and psuedocode.
|