Comp 213
Comp 213
Comp 213
Prorete
pae,
University of
Eldoret
aTe of knowiodge and nnovaton
UNIVERSITY EXAMINATIONS
pru
upnam
cobBE XEGULAR
FAICE
EXAMINATION
FOR THE DEGREE OF
NArMElE
Cna
BACHELOR OF SCIENCE
Ma )
V
URSE CODE:
OURSE
COMP 213
INSTRUCTIONS TO CANDIDATES
SEE INSIDE
PpOP wlk
natoo
Sction A (24 Marks) Compulsurb Pddpup
w r.
1knlan
l 7M o h 2 D s a u n d e r o u o
9 ty
3 N d
a. ProgrammeTS are migrating rom structured prðgramming to object oriented
[3 marks]
Question Two (12 Marks)
[3 marks]
Discuss the potential meanings of the throw, try, and catch in exception handling. Use
C. A class is required to determine the number of bytes for each data type entered into the
class oriented program that displays the corresponding bytes for
each
program. Write a
Saotohnr )
k k e r sA
ntze
Pnvee cou
Y D v d a h o o (
EXAMINATIONS (COMP, ANC, ASt, BIT)|
213: OBJECT ORIENTED PROGRAIMIMING, APRIL
2021i MAIN
UM
Raovhe wvsliaf
ons in
11. operesolution operator ( :: )
Tunoion Nümes in OoP
ii. Conditiona operators o n ePres s Mwduhu
to Galljunohon o
tvefuatty m
The dot operator. Se nen Memubu Junzh
OSe to a w es
of control structures.
b. With the of
help and a
syntaxflowchart, explain the following types
marks
break loop control structure
i.
3 marks
contiie loop control structure
11.
ternms
[2 marks]
c. Explain the following object oriented programming
. Friend functions
prbloms
is. Eapsulatign
doenPrim
prOiramMinO
uortd
reul
expaniO
Junpyn
ereuro
Question Ffve (12 Marks)
GoMpR/6
3 d weokk
coMP R
Q11 CoMP RI5
sHUM
22 212NA7
7 6ra 213
pRoGaMMIN
G
FR
as
oriented program the wage of labour (working on the daily basis)
Write an object to compute
h Wok
t h a m e M p l u 7 e e
u r o o d k e r
f al fi z o
wwgemauf50
ekie 1 ( i47sta){
Nacsnt55