revised notes chapter 1
revised notes chapter 1
Design,
Programming,
Testing.
Chapter 1
Begin with some clicks ….
https://www.youtube.com/watch?v=QvyTEx1wyOY
https://www.youtube.com/watch?v=I-EwobCl0ik
Programs
Algorithm:
Start1: Start
Step2: Read input the Radius r of the Circle
Step3: Area PI*r*r // calculation of area
Step4: Print Area
Step 5: End
Logic Flowcharts
Off-page connector. Even fairly small programs can have flowcharts that extend seve
pages. The off-page connector indicates the continuation of the flowchart on another
page. Just like connectors, off-page connectors come in pairs.
Flowline. Flowlines connect the flowchart symbols and show the
sequence of operations during the program execution.
Example of Flowchart for a
Cash Register Program
Start
sum=0
Input price
sum=sum+price
Yes More
items?
No
tax=sum x 0.0725
total=sum+tax
Stop
Psuedocode
This device is not visual but is considered a “first draft” of the actual
program.
Pseudocode is written in the programmer’s native language and
concentrates on the logic in a program—not the syntax of a
programming language.
Pseudocode for a
Cash Register Program
sum=0
While More items do
Input price
sum=sum+price
End While
tax=sum x 0.0725
total=sum+tax
Output sum, tax, total
Structured Programming
Machine language
Assembly Language
High Level Languages
Fourth Generation Languages (4GL)
URL’s for free Flowcharting software
www.smartdraw.com
www.gliffy.com/uses/flowchart-software/
www.breezetree.com/flowcharting-software/
Flowchart Software, FREE Flowchart Examples
and Templates ...
www.edrawsoft.com/flowchart.php
16