The Bcs Professional Examinations BCS Level 5 Diploma in IT: The British Computer Society
The Bcs Professional Examinations BCS Level 5 Diploma in IT: The British Computer Society
Tuesday 28th April 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)
b)
c)
d)
e)
A2.
a)
Briefly outline the purpose of using access specifiers to designate the members of a class as private, protected or public. (10 marks) Distinguish between single and multiple inheritance using suitable diagrammatic examples to illustrate your answer. (5 marks) What is meant by the term signature in describing a method? (5 marks)
b)
c)
d)
Turn over]
A3.
a)
Specify the symbols used in UML to represent the following inter-class relationships: i) ii) iii) iv) v) aggregation; association; composition; dependency; specialization. (5 marks)
b)
Specify the meaning of the symbols #, +, and -? between attributes and operations?
c)
Provide a class diagram for an online bookshop comprising at least 5 classes; include a range of instance variables. (15 marks)
B4.
a)
You are working in a company which uses object-oriented programming techniques and UML as a design tool. The company is about to undertake a project which is safety critical. Your manager had heard that the use of the Object Constraint Language (OCL) could be beneficial in this particular project. Write a short report which explains what OCL is and how it can contribute to the construction of high quality software. (10 marks) In the context of OCL explain the following terms: i) ii) iii) pre-condition; post-condition; invariant. (9 marks)
b)
c)
+journeys 0..*
+bus 1
+passengers
Explain the meaning of the following OCL fragment: context BusJourney inv: passengers->size() <= bus.numberOfSeats (6 marks)
Turn over]
B5.
a)
Explain what is meant by the techniques black-box testing and white-box testing and how they may be used when testing object-oriented software. (10 marks) Explain the purpose of integration testing and how it is used to assure the quality of object-oriented systems. Why is the integration testing of an object-oriented system likely to be more complex than that for a system developed using a topdown decomposition approach? (10 marks) Discuss whether, when testing a subclass, it is safe to assume that all the methods inherited from a previously tested superclass will function correctly. (5 marks)
b)
c)
B6.
a)
Define the following terms: i) ii) iii) iv) object oriented languages and typed languages; structured programming and procedural programming; abstract data types and encapsulation; coupling and cohesion. (16 marks)
b)
Discuss the way in which features of object-oriented languages support the enforcement of good programming practice. (9 marks)