Monday, September 27, 2010

Appendix 1

(A) Flowchart
- A Flowchart is a pictorial representation of the logical steps it takes to solves a problem . Almost every program involves the steps of input , processing , & output . When you create a flowchart , you draw geometric shapes around the individual statements and connect them with arrows .

SYmbol used in flowcharting

-Arithmetic operation statements are examples of processing .
-TO show the correct sequence of these statements , use flowlines to connect the steps
-To be complete , a flowchart should include a terminal (start/stop) symbol at each end .
-Use connector when a flowchart cannot physically fit on one page . The letters or numbers on the connectors match up so you can determine the next step in the flowchart .
-The off-page connector can be used when the flowchart is at the bottom of a page and must be continued on a new page . As with the on-page connector , the off-page connector has a symbol in it ( a letter or number ) and connect with another connector on a different page with the same symbol .

B. Pseudocode
-Pseudocode is an English-like representation of the same thing .
-Statements are written in simple English
-Each instruction is written on a separate line.
-Keywords and indention are used to signify particular control structures .
-Each set of instruction is written from top to bottom , with olny one entry and one exit .
-Groups of statements may be formed into modules , and that group given a name .

Exercise 1.3
-By using structure chart , pseudocode and flowchart , design the solution for a program that reads three (3) numbers from user , calculates their total and average , and displays the calculated total and average on the screen .

No comments:

Post a Comment