Overview of this chapter

  • The components of flow chart


BEFORE YOU START:

  • Always write in a Pencil
  • Draw the shape neatly, which means:
    • Use rulers for straight lines
    • The connecting points of the line should be neat.

WARNING: FAILURE OF FULFILLING THESE REQUIREMENTS WOULD RESULT IN HEAVY DEDUCTION OF MARKS BY MS D. I’m not even kidding.



Use of Different boxes

ShapeNameUse
CircleStart / End1. Beginning and ending of program
2. Beginning and ending of subroutine
TrapezoidInput / OutputUse to input or output
RhombusConditional statement1. IF / Switch case statement
2. Loops (Pre-condition and post-condition)
SquareNormal action1. Calculations
2. CALL statements
2. RETURN statements
4. DECLARE statements
5. All the other normal statements

Circles

Circles are for the starting and ending of a program or subroutine.

Every program or subroutine MUST have 1 “START” and at least 1 “END”.

Remember, After an “Return” statement in a subroutine, you would still need to furthermore point to the “End” statement, like this:


Trapezoids

Trapezoids are used for Input and Output statements in the program.

Like pseudocode, just write “INPUT “. Note that it’s still necessary to declare the variables beforehand.

Example:


Rhombus

Rhombus does all the Conditional Statements in a flowchart, which includes:

  • Conditional statements
    • IF…(ELSE IF)…(ELSE)…ENDIF sentences
    • Switch…Case sentences
  • Loops
    • REPEAT…UNTIL loops
    • WHILE…Do loops
    • FOR…NEXT loops

All Rhombus Have and only have 2 arrows coming out, one is “YES” and the other is “NO”.

Example:

Which is the same as

DECLARE skill: STRING <- ""
DECLARE all_skills: ARRAY[3] OF STRING <- ["thinking skills", "language skills", "international mindness"]

DO
    INPUT skill

    IF skill NOT IN all_skills THEN
        OUTPUT "Try again!"
    ENDIF
WHILE skill NOT IN all_skills

Squares

Squares basically does everything else. They do

Calculations

Function / Procedure call

Return statements (in a function)

Declaring Variables

And all other functions.


0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *