...

BCS THE CHARTERED INSTITUTE FOR IT PROGRAMMING PARADIGMS BCS HIGHER EDUCATION QUALIFICATIONS

by user

on
Category: Documents
26

views

Report

Comments

Transcript

BCS THE CHARTERED INSTITUTE FOR IT PROGRAMMING PARADIGMS BCS HIGHER EDUCATION QUALIFICATIONS
BCS THE CHARTERED INSTITUTE FOR IT
BCS HIGHER EDUCATION QUALIFICATIONS
BCS Level 6 Professional Graduate Diploma in IT
PROGRAMMING PARADIGMS
rd
Thursday 3 April 2014 – Morning
Answer any THREE questions out of FIVE. All questions carry equal marks.
Time: THREE hours.
Answer any Section A questions you attempt in Answer Book A
Answer any Section B questions you attempt in Answer Book B
The marks given in brackets are indicative of the weight given to each part of the question.
Calculators are NOT allowed in this examination
Section A
Answer Section A questions in Answer Book A
A1. Discuss how the following object-oriented concepts may help a programmer
design and implement an application. Illustrate your answer with appropriate
examples:
a)
objects and classes
b)
aggregation
c)
encapsulation
d)
single and multiple Inheritance
e)
polymorphism.
(5 marks per feature)
A2.
a)
Interactive Development Environments (IDE) have become increasingly
sophisticated in what they offer system developers.
Describe the functions typically found in such a tool.
(12 marks)
b)
Discuss whether these tools are more appropriate to a novice or to an
experienced programmer, assessing what features would help or hinder
them according to their programming competence.
(13 marks)
Turn over]
Section B
Answer Section B questions in Answer Book B
B3. a)
Many functional and imperative programming languages have a construct
called an exception. With the aid of examples, explain what an exception is
and how it can be used. In your answer, discuss why it is necessary to use
this construct in embedded and concurrent software, and describe problems
that are associated with providing this facility.
(12 marks)
b)
What is meant by the term referential transparency in the context of both
functional and imperative programming languages? Illustrate your answer
with examples from both an imperative and a functional programming
language with which you are familiar.
(13 marks)
B4. For a programming language to support concurrency, solutions to the problems
of process synchronisation and communication are required. Explain these
problems and describe the range of solutions that are available, discussing their
relative strengths and weaknesses.
(25 marks)
B5. a) With reference to the following code, discuss how facts, rules and goals
are used in a Prolog program. Explain how this program can be used to find
out the possible pairs of grandparent and grandchild? In your answer, briefly
explain the role of resolution and unification.
father(adam, susan).
father(adam, bill).
father(bill, carl).
mother(rose, susan).
mother(rose, bill).
mother(susan, trudy).
parent(X,Y) :- mother(X,Y).
parent(X,Y) :- father(X,Y).
grandparent(X,Z) :- parent(X,Y), parent(Y,Z).
(18 marks)
b)
What are extra-logical features and why might we need them in a
language such as Prolog?
(7 marks)
Fly UP