Please enable JavaScript.
Coggle requires JavaScript to display documents.
Ch.23 Algorithm Design (II) - Coggle Diagram
Ch.23 Algorithm Design (II)
23.1
Input
Data
Variables
A character
A string
A number
Output
(processed input)
Assignment Statements
Common operators
Sqrt (開方)
Sqr (2次方)
*
/
-
x^y
+
Mod (餘數)
23.2 Basic Control Structures
Sequence (Run all)
Selection control structure
Decision logic structure
(IF…THEN…Else)
Case logic structure (N cases)
CASE (expression) OF
case 1 : statement block 1
case 2 : statement block 2
case 3 : statement block 3 …
case n : statement block n
ELSE
statement block else
ENDCASE
Iteration
Pretest loop
WHILE-loop
FOR-loop
Posttest loop
DO…WHILE loop
REPEAT…UNTIL loop
Advantages of Using the Modular Approach in Programming
Writing standard procedures in separate modules can save us a lot of time.
It is easier to understand and debug a module because its size is relatively small and its purpose is also clearly defined and documented.
Modularization allows a team of programmers to work on a large program.
Each module can be tested separately.
Modularization makes a large project easier to be monitored and controlled