Question:Write the syntax of loop structure in pseudocode.
Answer
DO WHILE (condition)
instruction-1
instruction-2
...
END DO
Question:Write the syntax of loop structure in pseudocode.
DO WHILE (condition)
instruction-1
instruction-2
...
END DO
Question:What is sequence structure in pseudocode?
The sequence structure in pseudocode simply express in English what it is we want to do, in the order in which we want to do it.
Question:Write down the advantage and disadvantage of Modular programming.
Advantage:
1. As the size of each module are limited, the likelihood of errors is reduced.
2. Because the modules are independent, different programmers can work simultaneously on different parts of the same program. This reduces the times that elapses between beginning and completing a program.
3. In addition, a module can be radically changed without affecting other modules as long as its original function remains unchanged.
Disadvantage:
1. The modular programming approach initially met with some resistance from programmers because it restricted their activities.
2. When portions of a program are allocated to different programmers, no one programmer can be said to “own” the program; instead, it belongs to a team.
3. Team programmers, for example, no longer have free rain to make up names to refer to data. Even when the programmer is free to create a name, there are frequently naming conventions that must be followed.
4. A more significant difficulty with the modular approach lay in determining exactly what constitutes a module.
Question:Draw a structure chart for numbers problem (counting positive, negative and zero number).
See your text book (Programming Practice and Techniques) at page 34, figure 2-7
Question:Draw a structured flowchart on structure chart which is for counting positive, negative and zero number.
See your text book (Programming Practice and Techniques) at page 44, figure 2-16
Question:Draw a flowchart for sorting three numbers.
See your text book (Programming Practice and Techniques) at page 52, figure 3-4