Professional Documents
Culture Documents
Level Three
Duration 2 Hours
If you answer more than two questions from section B, marks will ONLY be awarded
for your TWO best answers.
Section A (Compulsory)
b) Study the class below and comment on how far it meets the canonical
form of classes.
Question 1 continued.
(c) Design patterns are now well recognized and used in software
development. Why is this? Explain the rationale and the benefits
behind their use.
[6 marks]
(d) (i) The presentation tier of a large application has to handle many
user requests and ensure they are all processed. One solution to
managing these is to use the Front Controller Pattern. Give an
outline of how this patterns works and the problem it is trying to
solve.
[5 marks]
(ii) The Front Controller Pattern is typically used with two other
J2EE patterns: the Application Controller Pattern and the
Intercepting Filter Pattern. Critically discuss ONE of these
patterns in detail.
[7 marks]
_________________________________________________________________
Object Oriented Software Development
COMP1307
Page 3 of 6
APPROVED
Section B (Answer any TWO questions)
• Interfaces
• Implementations
• Algorithms
[10 marks]
(d) Synchronising methods can make shared objects thread-safe but this is
not enough to coordinate the threads. Explain with an example when
threads need coordinating and the key Java methods that allow such
coordination to take place.
[10 marks]
3. (a) You have been commissioned to develop a simple web application for
an online bookshop using the Struts framework. The type of
functionality you will need to support will be adding books for sale,
allowing users to create book reviews, updating prices etc.
_________________________________________________________________
Object Oriented Software Development
COMP1307
Page 4 of 6
APPROVED
Question 3 continued.
(b) Consider the following Java application. The line numbers are for
reference only.
_________________________________________________________________
Object Oriented Software Development
COMP1307
Page 5 of 6
APPROVED
Question 4 continued.
(iii) If line 10 were to be replaced by the following code:
10 tiddles = animal;
Explain why this would result in a compiler error.
[3 marks]
(iv) With reference to this application, briefly discuss the concept of
polymorphism in Java.
[5 marks]
(b) What do you understand by the term scope in the context of a JSP?
[8 marks]
(c) Give a brief account of the unit testing framework JUnit, stressing its
importance for the philosophy of test driven development.
[12 marks]
_________________________________________________________________
Object Oriented Software Development
COMP1307
Page 6 of 6