Download File - BACK

shrewdnessfreedomΛογισμικό & κατασκευή λογ/κού

2 Δεκ 2013 (πριν από 3 χρόνια και 4 μήνες)

63 εμφανίσεις


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



the process of repeating a given action

either a certain number of times or until a given condition
is met


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


why is documentation important?


who wrote software not necessarily the team to maintain/modify

) who is it for?

users, follow
on programmers

) what does it consist of?

separate documents, comments in code

) how is it produced?

by hand sometimes, automatically sometimes

) w
hen is it produced?

as part of the process it describes/records

what are the problems with it?

often inadequate, out


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.


is a programming language or programming environment designed with a specific

purpose in mind, such as the development of commercial business software

Parallel proces

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.


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


translates a high level language program to low level language suitable for

later running on computer


translates a high l
evel program statement (and executes it) before moving

on to the next statement

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

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


tangible, physical parts of a computer


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


parser is responsible for recognising the phrase structure (syntax) of a programming


a) syntax error occurs at compile time

ething wrong in the phrase structure run
time error

some unusual numerical situation has occurred e.g. overflow

b) i) ( 2 / * 3 )


syntax requires only one (binary) operator between operands

ii) if( x>1 {y=1;}


closing parent
hesis missing after x>1

iii) a / (b



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


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

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


a) stacks and queues

both stacks and queues are dynamic data structures

stack queue

in out in










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


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


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)

algorithmic design in structured programming uses

three principles. describe each of these principles.

(12 marks)

structured programming uses principles


selection and


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.

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.

when a user is entering data on an i
nteractive form there are several interface elements that can be used

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

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

choose none, one or several from many

text box (rectangle, 1 line)

a little text (can be made secret for password)

textarea (rectangle, multi

a lot of text.

what does the term random access mean?


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]

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

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

(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

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

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


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


c) rewriting

need requ
irements analysis / specification

what does the package need to do

what is in the package.