Professional Documents
Culture Documents
S1TI
TEKNOLOG I
PEI''.
NI.
ni/iNYw'wi. vMl'WUMwMFYMw'n'nXA.
'MYXYwn; M
IrMNwY1NN'Iwww.
1Y/IMy7,
MII
COURSE
DATE
TIME
INSTRUCTIONS TO CANDIDATES
from the Questions Booklet,
Answer ALL rMuestlons
Begin EACH answer on a new page n the Answer Booklet
lrcateclearly answers that are cancelSecifany.
Where applicable, show clearly steps taken n arrvng at the solutions and
indicate ALL assumptions.
A
Note
are
the
(11) pages w
this Question Book'et iidg
r page
i.
,
I.,
.,
t :.
'r'
:k. "l"9():
1
L()g ..
1073/TAB 1013
I.
3.
Draw
flow chart to show the decision that can be made from TABLE
RON
A+B
AAB+C
A+BC
.
......
....
.
.
.
..
.
A+B+D
A+B+D
.
....
.
.
_.
wA+D
'A+D
C+CI
C+D
B+D
B+D
..w..W.
w...,.,. ...
R0N97
R0N97
R0N95
R0N95
R0N95
.. .
TABLE Q2
[8 marks]
b.
Qt
I 073/TAB i013
tu*Pent
stock
S$I
BON9S
it
is
s
critical
195 Quar
2. S D
is critical
it
0N95 Quant it ics
any
to
for
A+ are 4 Units
for
for
B*
are
3 Units
are
are
3 Urits
3 tIn its
nue
FIGURE QI
[12 marks]
T073iTA8 1013
i.
ii.
wiii
b.
Trace and write the output for the C++ program n FIGUREQ2. Show
hand
the
trace
all
steps.
#include
<ic strearn>
pacE'
std;
.
naill
using
i. nt : ma in t' :
t
:
start
t
.
iopVar1.
fcar
lopvar2
lva r3;
4
r
"
--
space
char
3;
.
.,,,
end
,
loopy 'a1.
<.
end,
ioopVari
+)
for
oo"
a
i '
,
,
aaM"'.
"''
_.
",
end
rl
;
r
.
opV,
ar2+
-
,
,
.
,.
. C,,,
cout
space;
I
..
''1..,
x'.
. y'
""a
for
ti
(:LooVx3
couT+'
start;
..
Loopvar:
y`.
MJIrFJiM
ii..
'
FIGURE Q2
[5 marks)
TBBI 073/iABiO13
a.
ia
r
mt
number[}
{2,8,11,
=
,)I
the owng
The dec'ared size of the array.
(1 marlcj
w
r
have.
[1 mark]
bY
Trace and write the output of the following C++ code fragment:
int,
for
j,
i,
Y.
_,.
'emp[8J
5";
>':..
<
i--)
:
0;
[i]
6;
""
for
(i
0;
6;
""w,
or(j
rout
if2)
.i
riurn . push,,.
r
3*1.
temp [ 1] );
0,
j<.
'
ms: x,zeQ;
.
terrr [i]
cout
i;
e,nd.
.,
j<
+ rnf:
[5 marks)
ck
if
is
the
integer
7
function that accepts an array of
vaiue
values.
function
This
it
be
to
shou'd return
a prime number, will
added a vector.
of prime numbers.
t3 marks]
TBB1O73ITAB1 013
project's score.
Write a C++ program that retrieves inputs from seven judges, score and
The
degree
difficulty.
the
is
for
the
of
output
of
a
program
overa$ score
a project.
[10 marks)
4.
O13
a.
State ONE (1) reason why Functions are used in computer programs.
[2 marks]
h.
03)
(mt
unctionabc
costfi
iL
[2 marks]
What is the difference between g)obal var and 1
vare?
c.
[2 marksj
Ana'yze the C++ code segment in Q4a to determine
Var2
Van
final
the
and
respectiveIy ,
value of
IL
0,
(void)
void gtal_Icaca1
{
ar2=
1;
cout
LocaN'
r2
Var1+1n
Var2+2,;
t
maEn()
It
iy
lor(i=O;
" ++)
g1();
geth;
return 0;
FIGURE Q4a
8
IB1 073/iAB'1I OI 3
[3 marks]
display
integers,
the
these
average
and
of
ate
function
aargest
integer
determine
the
to
caHa
accepted,
screen.
You may use the function n FIGURE Q4b n your programw
float duff;
N = nlw
if (n2
> maxN)
= ri2;
if (n3 > maxN)
ii3;
FIGURE
4b
[7 marks]
TBBI 073/TAB1013
5.
Many-to-One
[1 markj
ii.
One-toOne
[1 mark
idL
OnetoMany
[1 mark]
iv.
y4oMany
[1 mark]
b.
Name
Class
Marks
Rank
CHAR(40)
CHAR(6)
NUMBER(4)
CHAR(8)
[4 macs]
c.
in IT project consultatlonw
technologlst
handle
of
consultants comprised
certified
and can
up to
I 50 ciients per year. Each client can request for consuItaton on either
five
IT
Each
types
be
the
handled
the
of
project.
of
projects will
one of
by a consuftatlon team of four to five technologists. Each technologist
four
is assigned to a maximum of
consultation teamsw
ent.
the
to
Identify the main entities possible
[4 marks]
IL
(4 marks
"10
TBB1 073ITAB1 01 3
iii.
Using your answers in part (a}(i) and part (a)(ii), draw a single
Entity Relationship (ER) diagram to represent the data
for
Chen
the
Use
Model notation.
requirements
company.
[4 marksj
OF
PAPER-END
'1