3
(b) Describe three roles that Use Cases play as part of a Software Engineering
process.
[9 Marks]
3
(c) Using an example of your choice, provide a documented Use Case using the
following headings:
(i) Actor(s) [1 Mark]
(ii) Purpose / Intent [2 Marks]
(iii) High level description [2 Marks]
(iv) Pre-conditions [2 Marks]
(v) Extended step by step description of main flow [6 Marks]
(vi) Alternative flows (or scenarios) [3 Marks]
(vii) Post-conditions [2 Marks]
[18 Marks]
4
Q.1 (a) (i) In the context of software requirements modelling, explain what is meant
by the following terms:
Use Case
Actor
Communicates relationship
1
Use Case
Actor
Communicates relationship
(6 marks)
(ii) Using an example of your choice, draw a use case diagram that identifies
and illustrates the use of the three terms listed in part (i) of this question.
(6 marks)
1
(iii) Explain what is meant by the terms includes and extends and, using a
diagram, illustrate their use.
(8 marks)
2
(b) When documenting a use case, a set of headings is used under which certain
information is provided. Two of those headings are Main Flow and Alternative
Flows. Discuss the kind of information that is provided under these headings giving
an example of their use. In your answer provide an example Actor and the
Purpose/Intent of the use case.
(13 marks)
2
Q.1 Within the context of requirements modelling, explain what is meant by the
following terms. Illustrate your answers using a use case diagram.
(i) Actor
(5 marks)
(ii) Specialisation / Generalisation
(4 marks)
(iii) Use Case
(6 marks)
(iv) Communicates relationship
(4 marks)
(v) Extends
(5 marks)
(vi) Includes
(5 marks)
(vii) System Boundary
(4 marks)
4
Q.1 (a) In the context of Object Oriented (OO) analysis, outline what a Use Case is. In your
answer, identify three roles that use cases play in the implementation of an OO
system.
(5 marks)
3
(b) Discuss what an actor is within the context of a use case diagram and illustrate the
UML notation that relates to it.
(7 marks)
4
(c) Within a use case diagram, there are relationships that can exist between individual
use cases, one is extends the other is includes. Explain what each relationship means,
giving an example.
(6 marks)
2
(d) Using an example of your choice, provide a documented use case using the following
headings:
(i) Purpose or Intent
(ii) High level description
(iii) Pre-conditions
(iv) Extended step by step description of main flow
(v) Alternative flows (or scenarios)
(vi) Post-conditions
(15 marks)
3 & 4
(a) Given the structural model below. Answer the following questions. P1
(i) Explain, in detail, the meaning of the association between the two classes.
(5 marks)
5
(a) Given the structural model below. Answer the following questions. P1
(ii) Using the example, explain what is meant by referential integrity in the context
of Object-Oriented Programming.
(5 marks)
5
(a) Given the structural model below. Answer the following questions. P1
(iii) Show, using code examples, how referential integrity would be implemented
for this example.
5
The Principle of Least Knowledge promotes decoupling so that communication only
occurs between appropriate objects. Using a suitable class diagram and sequence
diagram example, explain how this principle can be breached while still allowing
correct business logic to be performed
6
Structural Model vs Use Cases
7
(b) Explain how an association or dependency relationship between two classes can be
thought of as a path of communication between instances of those classes.
7
(b) Explain how an association is related to:
(i) Links between objects.
(ii) Messages between objects in a sequence diagram.
8
(d) Consider the diagram below. It defines three classes and two associations. The code
below the diagram implements a scenario where a Person object requires the data
stored in a Knowledge object which can be accessed through a
getAnswerToLife() operation on the Knowledge object.
P2 - Answer in P3
(i) Draw a sequence diagram that illustrates the sequence of messages starting
at person.askTheOracle().
(ii) Within the context of the Principle of Least Knowledge identify a potential
issue that you see with the sequence diagram.
(iii) Briefly describe a possible solution that would address the issue.
What are the common design mistakes?
9
Explain how creational, structural and behavioural software design patterns differ
in terms of their focus, give examples, and definition.
8
The Singleton is an example of a creational software design pattern. In relation to
this pattern, provide the following:
(i) The Intent of the pattern.
(3 marks)
(ii) A description of a context within which the pattern could be applied.
(3 marks)
(iii) An example of the code that would implement it
9
Adapter Pattern
Category, Intent, Context, Diagram
10