Bcs Higher Education Qualifications BCS Level 5 Diploma in IT
Bcs Higher Education Qualifications BCS Level 5 Diploma in IT
a)
For each of the programming paradigms described below provide a phrase which
describes that paradigm and brief notes which explain how programmers develop
code in a language that supports the paradigm.
i)
ii)
iii)
A2.
b)
Compare and contrast the three programming approaches outlined above setting
out the advantages and disadvantages of each approach.
(10 marks)
a)
Give a short phrase which describes each of the following object oriented concepts.
For each phrase provide an example of code which implements the concept.
i)
ii)
iii)
b)
Turn over]
A3.
a)
Give the object oriented terminology for each of the following object oriented
features and supply an example of code that illustrates the feature:
i)
ii)
iii)
iv)
v)
b)
A blueprint for an object which defines all the data items contained in the
object and the operations that are permitted for the data;
A representation of something within the domain that the program models
that contains values of data and which implements operations on that data;
An operation which will manipulate the data contained in an object;
A variable which holds data that describes an individual object;
A variable which holds data that is relevant to all the objects created from
the same template.
(15 marks)
Programmers who use objectoriented languages frequently reuse code which has
been developed by themselves or other programmers. Describe the primary
technique which makes this possible and give a code example of it in use.
(10 marks)
Section B
Answer Section B questions in Answer Book B
B4.
a)
b)
B5.
c)
Describe any common dynamic data structure you are familiar with in object
oriented terms.
(5 marks)
a)
b)
Write code to implement the class diagram shown below. Supply a main() function
that instantiates an object of the class and makes appropriate use of each of the
functions.
(10 marks)
Turn over]
B6.
a)
b)
c)
Determine class member visibility for each variable in the class hierarchy provided
in Appendix A. Present your answer (in your answer booklet) in the form of a table
like the one shown below, using the following symbols: private (-), protected (#),
public (+), not visible (blank).
(12 marks)
AppendixA:CodeFragmentforQuestionB3
class C1
{
private:
a;
protected:
b;
public:
c;
};
class C2: protected C1
{
private:
d;
protected:
e;
public:
f;
};
class C3: public C2
{
private:
g;
public:
h;
protected:
i;
};
class C4: private C3
{
private:
j;
public:
k;
protected:
l;
};
Turn over]
** END OF EXAM **