Java Reference
In-Depth Information
of waiting in line, of vending machines, and of a thousand other worldly
things and social conventions that are necessary to perform this simple
chore.
The machine, on the other hand, has no previous knowledge, does not
understand social conventions, and has no experience with doors, stairs,
people standing in line, or vending machine operation. If we forget to tell
the robot to open the door it will crash through and leave a hole shaped
like its outline. If we forget to tell it to wait in line if someone else is using
the vending machine, then the robot may just walk over the current cus-
tomer in its effort to put the coins in the slot. The tin can has no experi-
ence, no social manners, and no common sense. Giving instructions to a
machine is different and much more complicated than giving instructions
to an intelligent being.
This is what computer programming is about. It is sometimes consid-
ered difficult to learn, not so much because it is complicated, but because
it is something to which we are not accustomed. Learning programming
requires learning the grammar and syntax of a programming language,
but, perhaps more importantly, it requires learning to communicate with
and issue commands to a tin can; a task indeed!
Flowcharting
Computer scientists have come up with tools and techniques to help us de-
velop programs. One of the simplest and most useful of these tools is the
flowchart. A flowchart, like the word implies, is a graphical representation
of the flow of a program. In other words, a flowchart is a graph of the tests,
options,andactionsthataprogrammustperforminordertoachieveaspe-
cific logical task.
Incidentally...
Present-day computers do not have human-like intelligence. Assump-
tions that are obvious when dealing with human beings are usually in-
validwhendealingwithamachine.Computerprogramsmustleaveno
loose ends and presume no reasonable behavior. You cannot tell a
computer“well...youknowwhatImean!”orassumethatacertainop-
erationissoobviousthatitneednotbeexplicitlystated.Theprogram-
mer uses a flowchart to ensure that each processing step is clearly
defined and that the operations are performed in the required se-
quence.
Search WWH ::




Custom Search