Algorithm - Flowchart
Algorithm - Flowchart
Algorithm ?
Step-by-step problem-solving process
Solution achieved in finite amount of time
Phase 3 - Maintenance
Use and modify the program if the requirements changes
Control Requirements: IF
If the tea-box is empty we wish to specify an extra step:
Get new box of tea from cupboard
This step would not be carried out unless the tea-box is empty,
We can express this by rewriting step 1.1 as
1.1.1. Take tea box from shelf
1.1.2. If box is empty
then get new box from cupboard
1.1.3. Remove lid from box
Step 1.1.2 expresses both the step to be selected and
the
condition under which this selection should be made.
More complicated conditions can use -->
Programming Fundamentals AND, OR, NOT 17
Ch1. Problem solving
Analyze the Problem(3)
Control requirements: while
Another common requirement is the need for
iteration.
Example. Repeat the mark conversion for a
class room of 30 students. Each student having a
unique student number from 1 to 30.