Fill in the Blanks
UNIT 7: ALGORITHMS AND PROBLEM SOLVINGOnline version
Descriptions of Section 7
Analysis
Before
any
problem
can
be
,
it
needs
to
be
clearly
and
set
out
so
anyone
working
on
the
solution
understands
what
is
.
This
is
called
the
?
requirements
?
for
the
program
.
The
stage
uses
abstraction
and
decomposition
tools
to
identify
exactly
what
is
required
from
the
program
.
Abstraction
keeps
the
key
elements
required
for
the
solution
to
the
and
discards
any
unnecessary
and
information
that
is
not
required
.
For
example
,
a
map
only
shows
what
is
required
for
travelling
from
one
to
another
.
Different
methods
of
transport
will
require
different
types
of
map
.
Decomposition
breaks
a
complex
problem
into
parts
,
which
can
then
be
into
even
smaller
,
that
can
be
solved
easily
.
Any
daily
task
can
be
divided
into
its
constituent
parts
.
For
example
,
getting
dressed
:
»
Select
items
to
»
any
clothes
being
worn
»
Put
selected
on
in
order
.
Design
:
The
program
from
the
analysis
stage
is
used
to
show
to
how
the
should
be
.
When
the
design
stage
is
complete
,
the
programmer
should
know
what
is
to
be
done
,
i
.
e
.
all
the
that
need
to
be
completed
,
how
each
task
is
to
be
and
how
the
tasks
work
.
This
can
be
formally
documented
using
structure
charts
,
and
pseudocod
e
Coding
and
iterative
testing
The
program
or
set
of
programs
is
.
Each
module
of
the
program
is
using
a
suitable
programming
language
and
then
tested
to
see
if
it
.
Iterative
testing
means
that
tests
are
conducted
,
code
,
and
tests
until
the
module
performs
as
required
.
Testing
:
The
completed
or
set
of
programs
is
run
many
times
with
different
sets
of
test
.
This
ensures
that
all
the
tasks
completed
work
as
specified
in
the
program
.
Computer
systems
,
sub
-
systems
and
decomposition
A
computer
system
is
made
up
of
,
data
,
hardware
,
communications
and
people
;
each
computer
system
can
be
divided
up
into
a
set
of
sub
-
.
Each
sub
-
system
can
be
further
divided
into
sub
-
systems
and
so
on
until
each
sub
-
system
just
performs
a
action
.
Computer
systems
can
be
very
large
,
very
small
or
any
size
in
between
;
most
people
with
many
different
computer
systems
during
their
daily
life
without
realising
it
.
For
example
,
when
you
wake
up
in
the
morning
,
you
might
use
an
app
on
your
smartphone
for
your
,
then
you
might
check
the
weather
forecast
on
your
computer
before
driving
to
work
.
The
alarm
program
is
a
very
small
system
but
when
you
check
the
weather
forecast
,
you
obtain
the
information
you
need
from
one
of
the
largest
computer
systems
in
the
world
.
The
computer
system
and
its
sub
-
systems
In
order
to
understand
how
a
computer
system
is
built
up
and
how
it
works
it
is
often
up
into
sub
-
systems
.
This
division
can
be
shown
using
-
down
design
to
produce
structure
diagrams
that
demonstrate
the
construction
of
the
system
.
Each
sub
-
system
can
be
developed
by
a
programmer
as
a
-
routine
.
How
each
sub
-
routine
works
can
be
shown
by
using
flowcharts
or
pseudocode
.
Top
-
down
design
is
the
decomposition
of
a
computer
system
into
a
set
of
sub
-
systems
,
then
breaking
each
sub
-
system
down
into
a
set
of
sub
-
systems
,
until
each
sub
-
system
just
performs
a
action
.
This
is
an
effective
way
of
designing
a
computer
system
to
provide
a
solution
to
a
problem
,
since
each
part
of
the
problem
is
broken
down
into
smaller
more
problems
.
The
process
of
breaking
down
into
smaller
sub
-
systems
is
called
refinement
.
This
structured
approach
works
for
the
development
of
both
large
and
small
computer
systems
.
When
larger
computer
systems
are
being
developed
this
means
that
several
programmers
can
work
independently
to
develop
and
test
different
sub
-
systems
for
the
system
at
the
same
time
.
This
reduces
the
development
and
time
.
Decomposing
a
problem
Any
problem
that
uses
a
computer
system
for
its
solution
needs
to
be
decomposed
into
its
parts
.
The
component
parts
of
any
computer
system
are
:
»
inputs
?
the
data
used
by
the
system
that
needs
to
be
while
the
system
is
active
»
processes
?
the
tasks
that
need
to
be
using
the
input
data
and
any
other
previously
stored
data
»
outputs
?
information
that
needs
to
be
or
printed
for
the
users
of
the
system
»
storage
?
data
that
needs
to
be
in
files
on
an
appropriate
medium
for
use
in
the
future
.
Methods
used
to
design
and
construct
a
solution
to
a
problem
Structure
diagrams
Structure
diagrams
can
be
used
to
show
top
-
down
design
in
a
diagrammatic
form
.
Structure
diagrams
are
,
showing
how
a
computer
solution
can
be
divided
into
sub
-
systems
with
each
level
giving
a
more
breakdown
.
If
necessary
,
each
sub
-
system
can
be
further
.
Pseudocode
is
a
simple
method
of
showing
an
.
It
describes
what
the
algorithm
does
by
using
key
words
that
are
very
similar
to
those
used
in
a
high
-
programming
language
.
Data
items
to
be
by
the
algorithm
are
given
meaningful
in
the
same
way
that
and
constants
are
in
a
high
-
level
programming
language
.
However
,
pseudocode
is
not
bound
by
the
strict
rules
of
a
programming
language
.
It
does
what
its
name
says
,
it
pretends
to
be
programming
code
!
»
a
non
-
proportional
is
used
throughout
»
all
keywords
(
words
used
to
describe
a
specific
e
.
g
.
)
are
written
in
letters
»
all
given
to
items
and
start
with
a
capital
»
where
and
loop
are
used
,
or
selected
statements
are
by
spaces
.
Pseudocode
for
conditional
statements
When
different
actions
are
performed
by
an
algorithm
according
to
the
of
the
,
conditional
can
be
used
to
which
action
should
be
.
There
are
two
types
of
statement
:
A
condition
that
can
be
or
false
such
as
:
.
.
.
THEN
.
.
.
.
.
.
ENDIF
For
an
condition
the
path
is
if
the
condition
is
and
the
path
is
followed
if
the
is
false
.
There
may
or
may
not
be
an
ELSE
path
.
The
end
of
the
statement
is
shown
by
.
There
are
different
ways
that
an
IF
can
be
set
up
:
Use
of
a
variable
that
can
have
the
TRUE
or
made
by
using
comparison
,
where
comparisons
are
made
from
left
to
,
for
example
:
A
>
B
means
?
A
is
than
B
?
Comparisons
can
be
simple
or
more
complicated
,
Another
way
to
use
statements
is
a
choice
between
several
values
,
such
as
:
CASE
OF
.
.
.
OTHERWISE
.
.
.
For
a
CASE
statement
the
value
of
the
decides
the
path
to
be
taken
.
Several
values
are
usually
.
OTHERWISE
is
the
path
taken
for
other
values
.
The
of
the
statement
is
shown
by
ENDCASE
.
|