You are on page 1of 4

THE BRITISH COMPUTER SOCIETY

THE BCS PROFESSIONAL EXAMINATIONS


BCS Level 5 Diploma in IT
OBJECT ORIENTED PROGRAMMING
Monday 5th October 2009 - Afternoon
Answer any FOUR questions out of SIX. All questions carry equal marks
Time: TWO 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.

a)

Compare and contrast:


i)
ii)
iii)

Structured programming;
Programming using abstract data types;
Object oriented programming.
(15 marks)

b)

Describe five advantages of the object oriented programming paradigm.


(10 marks)

A2.

a)

Explain the following:


i)
ii)
iii)

abstract method;
abstract class;
abstraction.
(9 marks)

b)

How do abstract methods and abstract classes support polymorphism? Illustrate


your answer with at least one code example.
(8 marks)

c)

Explain how polymorphism supports code reuse.


(8 marks)

Turn over]

A3.

a)

Explain the following terms:


i)
ii)

object;
class.
(6 marks)

b)

Using code examples describe the following three types of inter-class relationship:
i)
ii)
iii)

inheritance;
association;
aggregation.
(9 marks)

c)

Use a code example to describe what is meant by delegation and explain the
benefits of this technique.
(10 marks)

Section B
Answer Section B questions in Answer Book B

B4.

a)

In the context of a design pattern, explain what is meant by the following: motivation,
prerequisites, structure, participants and consequences.
(10 marks)

b)

Give an example of three different types of design patterns, explaining what type of
problems they aim to resolve, include an example of their use.
(15 marks)

B5.

The Very Large Programming Conference (VLPC) is an annual international conference


that is held every September in a different country. Each year a call for papers invites
academics to write papers for the conference. Authors write their papers and submit them
to the conference for reviewing. The conference has a Programme Chair who appoints the
reviewers, who are called the Programme Committee. A subset of this Committee are
chosen to be Regional Chairs. After the closing date for submissions, the Regional Chairs
assign each paper from their region a unique number and then send it out to two reviewers.
Each reviewer will review their allocated papers, by providing a score for each paper and
comments for the author(s).
The Regional Chair will collate the reviewers comments and will produce a list of papers,
ordered by their score, which will be sent to the Programme Chair. The Programme Chair
makes the final decision on the papers. Those with high scores will be accepted for the
conference, whereas papers with a low score will be rejected outright. Depending on the
reviewers comments, a further decision will be made as to whether a paper needs to be
revised by the authors; or can be accepted for the conference without changes. If a paper
needs revisions, the authors have to resubmit a new version within a months deadline.
When the required number of papers has been accepted for the conference, the
Programme Chair will produce a Conference Programme.
a)

Draw a use case diagram for this system


(15 marks)

b)

Discuss how use case diagrams and descriptions provide an overview of the user
requirements of a system. Within your answer include examples from the above
system.
(10 marks)

Turn over]

B6.

Given the following Class diagram:

a)

Using an object-oriented language that you are familiar with, write code to produce
the following:
i)

Class definitions for all classes


(10 marks)

ii)

b)

A constructor for Department, with 2 parameters for departmentNo and


departmentName. noOfDepartments should be incremented each time a
Department is created. Show how this constructor can be used in practice.
(6 marks)

Discuss how the above object-oriented code can be tested.


(9 marks)

You might also like