Algorithms and Flow Charts

advertisement
GCSE INFORMATION COMMUNICATION TECHNOLOGY
HOMEWORK
Algorithms and Flow Charts
Program flow charts
The steps taken by a program to carry out
a process are called an algorithm.
Algorithms can be expressed as a flow
chart. Traditionally, programmers
documented their algorithms with flow
charts.
In a program flow chart, there are special
symbols for stages such as:
Systems flow charts
These show the flow of data through a
system. Processes are not given in detail.
Systems flow charts show input, output
and files
Some flow chart symbols
Keyboard input
Disk file
Start or end
Tape file
Process
Process
Input or output
Paper output
Decision
It is important to be able to use a systems
flow chart to describe a simple operation.
For example, a mail merge operation can be
shown as follows:
No
Enter names
And addresses
This program flow chart shows password
checking during a network login:
Start
Set counter to 1
Validate
Yes
Enter password
OK?
Store data
Is password OK?
No
increase
counter by 1
Data file
Letter
Merge
Yes
No
is counter>3?
Allow login
Merged letters
Yes
Lock account
End
Algorithms as statements
Program flow charts are used less than
they used to be. Processes are often
described by a series of statements
resemble code in a high level programming
language, they are called pseudocode.
Data flow diagrams
These are simple diagrams to show how data flows through an organisation. They include
human as well as computer processes. No detail is given of how is stored.
Some data flow diagram symbols
Order
Process
Customer
Data store
Entity/data source
Data flow
customer OK
credit check
Status
send order
warehouse
Credit
Status
Customer file
Algorithms and flow charts
Flow charts are often the easiest way to show processes in a computer system. There
are some standard types.
Questions
1
2
3
4
5
What sort of diagram is used to show the relationship between processes,
files, input and output?
What is a data flow diagram used for?
What does a program flow chart represent?
What is pseudocode?
What type of flow chart looks in detail at how a process works?
Download