algorithm
-
an effective method in which a list of well
-
defined instructions for completing a task will, when
given an initial state, proceed through a well
-
defined series of successive states, eventually terminating in an
end
-
state
iteration
-
the process of repeating a given action
-
either a certain number of times or until a given condition
is met
gui
-
graphical user interface, nowadays most often wimp (windows, icons, menus, pointing device)
code generator
-
a software tool that can
generate code for particular application areas from a very high level
specification, without the need for a human to supply e.g. an algorithm
Documentation
a)
why is documentation important?
-
team
who wrote software not necessarily the team to maintain/modify
b
) who is it for?
-
users, follow
-
on programmers
c
) what does it consist of?
-
separate documents, comments in code
d
) how is it produced?
-
by hand sometimes, automatically sometimes
e
) w
hen is it produced?
-
as part of the process it describes/records
f)
what are the problems with it?
-
often inadequate, out
-
of
-
date
prototype
-
a basic version of the system is built, tested, and then reworked as
necessary until an acceptable prototype is
finally achieved from which the complete
system or product can now be developed.
4gl
-
is a programming language or programming environment designed with a specific
purpose in mind, such as the development of commercial business software
Parallel proces
sing
-
the simultaneous processing of different tasks by two or more
microprocessors, as by a single computer with more than one central processing unit or
by multiple computers connected together in a network.
A data type in programming languages is an a
ttribute of a data which tells the computer
(and the programmer) something about the kind of data it is. this involves setting
constraints on the datum, such as what values it can take and what operations may be
performed upon it.
i) conditional
execution: applying a test and, depending on the result, executing a
particular group of statements (or not)
ii) looping : (thinking of a pre
-
check loop) applying a test to see whether a particular
group of statements should be executed or not then, if t
he statements are executed,
going back and re
-
evaluating the condition to see if the statements should be executed
again. in this way the statements may be executed any number of times (including none)
until the condition causes the loop to terminate.
b)
i) structure of conditional statement
if ( [expression] ) [statement]
five components in strict sequence
token 'if', token '(', expression structure, token ')', statement structure
ii) structure of loop statement
while ( [expression] ) [statement]
five co
mponents in strict sequence
token 'while', token '(', expression structure, token ')', statement structure
a)
compiler
-
translates a high level language program to low level language suitable for
later running on computer
interpreter
-
translates a high l
evel program statement (and executes it) before moving
on to the next statement
b)
Data structure
-
the recognition of sequencing (record), selection (variant, union) and
repetition (array, file) within data
-
and recognising primitive data types (i.e. no
t made up
of other types) e.g. integer, character, boolean, ...)
program structure
-
the recognition of sequencing (;), selection (if) and repetition (for,
while) in programs
c)
Black box test
-
testing a subroutine via its interface with no knowledge of
its inner
workings (code)
white box test
-
testing a subroutine with full knowledge of its code
d)
Hardware
-
tangible, physical parts of a computer
Software
-
sets of instructions for a computer which can be written down, but for
execution have to be ult
imately stored in sequences of binary digits encoded in some
physical way such as the presence/absence of electrical current or n/s magnetic polarity
b) High level language is symbolic vs m/c code is numeric
high level language is m/c independent
-
m/c cod
e is m/c dependent
c) lexical analyser is responsible for recognising the tokens (words) of a programming
language.
parser is responsible for recognising the phrase structure (syntax) of a programming
language
a) syntax error occurs at compile time
-
som
ething wrong in the phrase structure run
-
time error
-
some unusual numerical situation has occurred e.g. overflow
b) i) ( 2 / * 3 )
-
expression
-
syntax requires only one (binary) operator between operands
ii) if( x>1 {y=1;}
-
statement
-
closing parent
hesis missing after x>1
iii) a / (b
-
b)
-
expression
-
division by zero
a library routines should include pre
-
written, pre
-
compiled, defined interface, defined calling
convention, defined error codes for incomplete or otherwise failed action, and assist
ance to
productivity and testing.
b independent compilation should contain compilation by parts, pieces later to be linked
together, productivity from multiple module production, and sequence dependencies of
compilation for interface checking
c
parallel processing should include multiple processors, special compiling for splitting
programs, description of types of parallel architectures and specific types of application
(e.g. matrix calculations for weather prediction)
what are the main functio
ns of the system software on a general purpose computer?
state, the reasons, whether these functions differ significantly between a personal
computer (pc) or a linux/unix type environment. (12 marks)
main functions include cpu management, memory management
, disk file management and i/o or network
management.
two broad approaches were acceptable. one approach was to note that linux/unix systems
were not significantly different to pc systems because the machines under consideration
architectures and therefo
re possessed the same basic needs. alternatively,
an acceptable answer was a convincing case that linux/unix machines were often employed in
demanding, network
-
support roles that required unusual elements of system software support
such as remote diagnosis
, mirror disks and/or hardware redundancy/majority voting on
breakdown.
a) stacks and queues
both stacks and queues are dynamic data structures
stack queue
in out in
------
------
------
------
------
------
------
------
out
last in, first out structure
first in, first out structure
[lifo structure] [fifo structure]
this section was generally well answered. some students did waste time writing implementations in
code which was not required.
b) cohesion and coupling
cohesion
concerns the relationship between data items within a particular module. it represents how
tightly bound the internal elements of a module are to each other. it gives the designer a measure of
whether elements belong in the same module. there are several
levels of cohesion
–
thus
coincidental, logical, procedural, sequential cohesion.
coupling measures the relationship of data between distinct modules. it thus attempts to capture how
strongly two different modules are inter
-
connected. generally coupling sh
ould be minimised.
compiled program:
a compiled program is a block of executable code produced from source code by a compiler. it is not changed
during a program run. any syntactic source code errors are detected at the outset and
reported on an error lis
ting. if there are many compile time errors, propagation errors may be
produced by early errors and likewise reported. this can make correction of errors later on in the
source code difficult. this process is efficient if many runs of the program are requi
red. (6 marks)
interpreted program:
an interpreted program is run directly from the source code, each line (sometimes segment) of the code being
directly translated as it is reached, before being executed immediately. thus an error is
reported individuall
y, and execution stops where it occurred. values of all the variables are directly
available, unlike a compiled
-
program execution. hence improved diagnostics are often available.
this process generally results in repeated translation of the same line of co
de, which causes far
slower execution speed than for compiled programs.
often this process is used for small programs which can be developed interactively, hence it is often
used for teaching. (6 marks)
a)
algorithmic design in structured programming uses
three principles. describe each of these principles.
(12 marks)
structured programming uses principles
•
sequence,
•
selection and
•
iteration.
b)
give an example of each principle applied to
code. (9 marks)
sequence is code is begin..end
block, or similar in other programming languages.
selection in code is if..then..else.. , or similar in other programming languages.
iteration in code is a loop.
c)
give an example of each principle applied to
data. (9 marks)
sequence in data is a recor
d or structure, or similar in other programming languages.
selection in data is a variant record, or union or alternate structure, or similar in other
programming languages.
iteration in data is an array or file.
many candidates answered parts (a) and (b)
and either repeated their answer to part (b) in
part (c) or left part (c) blank so 9 marks were lost immediately. data structure diagrams are a
convenient way of showing sequencing, selection and repetition in data.
9.
when a user is entering data on an i
nteractive form there are several interface elements that can be used
for
different kinds of data. summarise the elements, show what they look like on the interface and describe the
type(s) of data for which they are best used.
(12 marks)
answer pointer
s
drop
-
down listbox/menu/select/combo (can be largely hidden apart from one choice until clicked on)
choose 1 from many or several from many, a lot of choices taking up little screen area
radio buttons (circles)
choose exactly 1 from many
check boxes
(squares)
choose none, one or several from many
text box (rectangle, 1 line)
a little text (can be made secret for password)
textarea (rectangle, multi
-
line)
a lot of text.
what does the term random access mean?
random
access means that any available address can be reached equally quickly
give an example of a computer device which is random access.
main memory, disc store [at least in comparison to tape
-
based device]
give brief details of situation in which a random
access file would ideally be used.
a typical scenario is where an individual, fast, online response is required [as opposed to batch processing]
-
as
provided by modern database systems
-
so any online query system [e.g. what's my balance?]
1)a new elect
ronic device that stores music and connects to the domestic television is
being developed. it is to be controlled solely by a remote control which has only 5
buttons labelled
up
,
down
,
left
,
right
,
select
.
a) consider
each of the five main interactive screen interface elements found on
web pages (and elsewhere) and describe which elements can be used easily
with this restricted remote control.
(8 marks)
b) describe one way of implementing textual input using this inter
face.
(4 marks)
answer pointers
a) push button
-
can use up, down, left, right to navigate to button, select to push
radio button
-
can use up, down, left, right to navigate to button, select to push
check box
-
can use up, down, left, right to navigate to
button, select to push
drop
-
down menu
-
can use left right to navigate to menu;
up, down to navigate to chosen item; select to select item
text box
-
cannot be used
b) to simulate a text box, show a display of characters (possibly, but not necessarily in
traditional
keyboard layout) which work as buttons. use up, down, left, right to navigate to a character,
select to select character. repeat to enter rest of text. need an ok/done button to signal end of
text entry.
a) running
package
-
need user's guide
-
detailed guide on how to load and run the package with
all the options available
[other answers offered review & maintenance, user's documentation, user manual,
maintenance documentation]
b) recoding
-
need functional design
-
detailed guide to all the routines with function interfaces,
parameter descriptions, etc
-
how has the package been written
[other answers: programmer documentation, technical documentation, system design, system
documentation]
c) rewriting
-
need requ
irements analysis / specification
-
what does the package need to do
-
what is in the package.
Enter the password to open this PDF file:
File name:
-
File size:
-
Title:
-
Author:
-
Subject:
-
Keywords:
-
Creation Date:
-
Modification Date:
-
Creator:
-
PDF Producer:
-
PDF Version:
-
Page Count:
-
Preparing document for printing…
0%
Σχόλια 0
Συνδεθείτε για να κοινοποιήσετε σχόλιο