Você está na página 1de 12

*TM3541606F1*

TM3541606F1

TM354/H

Module Examination 2016

SOFTWARE ENGINEERING

Friday, 3 June 2016 2:30 pm 5:30 pm

Time allowed: 3 hours

This examination is in TWO parts and you should attempt as many


questions as you can in BOTH parts. Your answers to each part should
be written in the blank answer book(s) provided.
Part 1
This part contains ten short questions. You should attempt ALL the
questions in Part 1.
The total score for Part 1 is 50 marks.
Part 2
This part consists of two longer questions. You should attempt BOTH
the questions in Part 2.
The total score for Part 2 is 50 marks.
At the end of the examination
Check that you have written your personal identifier and examination
number on each answer book used. Failure to do so will mean that
your work cannot be identified.
Put all your used answer books together with your signed desk record
on top. Fasten them in the top left corner with the round paper fastener.
Attach this question paper to the back of the answer books with the flat
paper clip.

Copyright 2016 The Open University


PART 1 Answer ALL questions from this part of the examination.

Question 1 (a) What is the main motivation for, and benefit from, agile software
development?
(3 marks)
(b) What is the purpose of modelling in agile development?
(2 marks)

Question 2 (a) Indicate two characteristics that distinguish agile requirements


documentation from plan-driven requirements documentation.
(2 marks)
(b) Consider the following description of a non-functional requirement.
The software is to be used in extreme weather conditions.
(i) What category of non-functional requirement is it?
(ii) Suggest a suitable fit criterion for this requirement.
(3 marks)

Question 3 (a) Consider the following extract from a business description of a youth choir.
A youth choir takes children as members from 5 to 18 years old. The choir is
organized in different sections per age. The choir accepts both boys and girls
up to the age of 10. From the age of 11 onwards all members of the choir are
girls and they need to audition to continue as, or become members. The choir
organizes two events per year for all its sections and a tour for a chamber
section for girls from the age of 15.

From the description identify one business process and two business rules
in this domain.
(3 marks)
(b) Suggest an advantage and a disadvantage of expressing business rules
using a formal language like OCL.
(2 marks)

2 TM354 June 2016


Question 4 Questions 4 and 5 use the following information
Figure 1 shows a fragment from the analysis diagram for a system designed to
record match fixtures in a local football league.

Figure 1
(a) (i) What fact is expressed by the {subset} constraint?
(ii) Suggest an alternative that could be used instead of the special
{subset} notation.
(2 marks)
(b) Consider the association loop with classes Ground, Club, Team and Fixture.
Write in OCL the following invariant that applies to this association loop: The
ground where a fixture is played is the ground of one of the clubs whose
teams are playing in that fixture.
(3 marks)

Question 5 Imagine we want to implement a use case assign player, where the goal of the
use case is to assign a player to a team (see Figure 1).
The use case assign player will have the following pre- and postconditions:
Preconditions:
The instance of the class Member and the instance of the class Team are
linked to the same instance of the class Club.
Fewer than 11 instances of Member are currently linked to the instance of
the class Team in the role of player.
Postcondition:
The instance of the class Member and the instance of the class Team will
have been linked with the instance of the class Member in the role of player
This use case requires the following operations (Table 1).

TM354 June 2016 TURN OVER 3


Table 1

Class Operation
Member addTeam(t : Team)
Team addPlayer(m : Member)

(a) Draw a pair of object diagrams, before and after, to illustrate the effect of the
use case.
(2 marks)
(b) Assuming the associations between Member and Team are bidirectional,
there will be a consistency requirement. To illustrate, if player1 is linked to
team1, then team1 must be linked to player1.
What do the GRASP patterns suggest for handling this requirement? What
impact would this suggestion have in terms of the operations in Table 1?
(3 marks)

Question 6 An online agency arranges lettings for holiday cottages. This question is
concerned with the lifecycle of a reservation, which represents the fact that a
customer has booked a particular property between given dates.
When a customer submits a booking request a provisional reservation is created
and a confirmation invoice sent within two working days. If the customer decides
to accept and the start date of the rental is more than 10 weeks away they must
then pay a deposit of 25% of the rental cost; otherwise they must pay the full
rental.
If the customer decides not to accept, the reservation is cancelled.
Where the full cost was not due at the time of booking, the balance must be paid
not later than 10 weeks before the start date of the rental. Failure to pay by the
due date results in the reservation being cancelled with no refund of the deposit.
If a customer cancels a fully paid reservation they receive a refund of 50%
providing the cancellation is made more than 5 weeks before the start date of the
rental. Otherwise no refund is made.
When the start date of the rental is reached a fully paid reservation which has not
been cancelled will then be recorded as fulfilled.
Consider the following states for an instance of Reservation: provisional,
reserved, fully paid, and two final states cancelled and fulfilled. Draw a statechart
diagram showing the lifecycle of an instance of Reservation.
(5 marks)

Question 7 (a) Suggest one reason why reuse is desirable in software development.
(2 marks)
(b) Briefly outline the purpose of the Adapter pattern, explaining when you
would use it.
(3 marks)

4 TM354 June 2016


Question 8 (a) In the context of component-based development (CBD) and service-oriented
architecture (SOA) give one way in which a service is like a component and
one way in which it is different.
(2 marks)
(b) Performance is an important quality attribute. Suggest two tactics that can
help meet performance requirements.
(3 marks)

Question 9 (a) Compare the code excerpts in Table 2 below using the lines-of-code (LOC)
and cyclomatic-complexity metrics. What can be said about the relative
complexity of the two pieces of code?

Table 2

Code A Code B
int[] w = new int[3]; int[] w = new int[3];
w[0] = u[0] + v[0]; for (int i = 0; i < 3;
i++)
w[1] = u[1] + v[1];
w[i] = u[i] + v[i];
w[2] = u[2] + v[2];
return w;
return w;

(3 marks)
(b) A precondition of both the code excerpts in Table 2 is that arrays u and v
must both have at least three elements. Write an executable assertion to
express this precondition.
(2 marks)

Question 10 Consider two agile practices and discuss how/whether they can be adapted by
teams that are not co-located.
(5 marks)

TM354 June 2016 TURN OVER 5


PART 2 Answer BOTH questions from this part of the examination. Each question carries
25 marks.

Question 11 This question concerns the development of a small software system. Figure 2
below outlines the problem domain. This description is not complete but it
contains all the information needed to answer the questions that follow.

The Notlaw University Continuing Education Department Enrolment System


Current system
The Notlaw University Continuing Education Department (NUCED) provides a
range of part-time courses that can be studied at various locations in and around
the city of Notlaw. Prospective students can obtain a brochure with details of
each course on offer, including the course code, description, the day of week
when it is held, start and finish times, start date, the number of meetings, the
location(s) at which it is offered, and the course fee.
Once a student has chosen a course they can enrol by one of two routes.
By completing an application form and posting it or delivering it in person to
NUCEDs offices, with payment being made after the application.
By supplying the required details to an enrolment administrator over the
telephone. Telephone enrolment is only possible if payment is by credit or debit
card.
Each course has a limited number of places at each location at which it runs.
Applications must be made at least 7 days before the course start date. When an
application is received an enrolment administrator checks with the Enrolment
System that there is a place available at the location requested and if so collects
the students details and checks the application. If the enrolment is successful the
administrator enters the details into the Enrolment System, the payment
information is passed to a separate Finance System and the student is sent a
confirmation quoting a unique enrolment reference number. If there is no place
available at the requested location, the administrator suggests, if possible, an
alternative location at which the student can take the same course.
Students wishing to cancel may do so and receive a full refund for fees paid
providing the cancellation is made at least 14 days before the course start.
Cancellations can be made only in person or by telephone. In the case of a
cancellation, the administrator checks that there is an enrolment corresponding to
the reference number supplied, that the student has paid and that the required
14 days notice has been given. If successful the cancellation is entered into the
system, a confirmation is sent to the student and the details needed to generate
a refund are passed to the finance system.

Figure 2 The problem domain


(a) Draw an activity diagram for the existing business process handle
telephone application. Your diagram should consider the Student, the
Administrator, the Enrolment and Finance Systems roles.
(7 marks)

6 TM354 June 2016


(b) Figure 3 below provides an outline of the proposed software system, which
will be known as the WDA Booking System.

Proposed system
Currently students cannot enrol or cancel online and are only able to view the
courses brochure in printed form. NUCED wants to introduce a new Enrolment
System which will allow web browsing of the course catalogue, as well as online
enrolments and cancellations. Students need to register once for online access
and then login every time they want to cancel or enrol online. When the new
system is introduced, students who prefer will still be able to enrol by completing
a form or by telephone, as at present, with the administrator now using the new
system to process their application. The administrator will also use the new
system to process cancellations.

Figure 3 The proposed software system


Consider the new system to be introduced.
1. List the actors for the proposed system.
2. Identify the use cases for the proposed system.
3. Draw a use case diagram for the proposed system that is to be
developed, with the actors and use cases you identified in 1 and 2, and
their relationships.
(7 marks)
(c) Table 3 below is an incomplete textual description of the use case cancel
enrolment from the NUCED new system. At present the main success
scenario is missing.
Table 3

Identifier and name UC4 cancel enrolment


Initiator Student
Goal An enrolled student supplies an
enrolment reference number and their
enrolment is cancelled.
Precondition An enrolment corresponding to the
supplied reference exists and the start
state of the course is at least 14 days
ahead of todays date.
Postcondition The enrolment will have been
cancelled, a refund of any fee paid will
have been generated, and the number
of free places for the course and
location concerned will have increased
by one.
Assumptions None
Main success scenario
To be completed

TM354 June 2016 TURN OVER 7


Extensions None
Write the main success scenario for this use case. In your answer you only
need to provide the main success scenario you have written, not the other
parts of the textual description.
(5 marks)
(d) Imagine yourself as one of the stakeholders for the new system and write a
user story for the proposed system, from the point of view of that
stakeholder.
(3 marks)
(e) Write a non-functional requirement that might apply to the user story in (d),
providing any extra information required. State what type of non-functional
requirement it is and provide a suitable fit criterion that could apply to it.
(3 marks)

8 TM354 June 2016


Question 12 Part (a) only of this question refers to the NUCED new system.
(a) Figure 4 shows part of an analysis model for the NUCED new system (see
Question 11). This question part asks you consider various additions to the
model. You can give your answers as text or as diagrams, or using a
combination of the two.

Department

*
Course

* * Location

Figure 4
(i) From the problem description for the NUCED Enrolment System decide
what the missing attributes of Course should be and list them together
with their corresponding data types. In some cases you may need to
use a placeholder (i.e. a made-up name used temporarily) for the type.
(2 marks)
(ii) Consider two further classes Student and Enrolment, which model a
registered student and a course enrolment respectively.
1. List suitable attributes, including their types, for each of the classes
Student and Enrolment
2. (1 mark)
1.1. Suppose classes Enrolment and Student are to be added to Figure
4. Explain any relevant association(s) you would need to create
(and their multiplicities) and justify your choice.
(3 marks)
1.1.1. Consider the association between classes Course and Location.
How would you represent the fact that a course has a different
code for each location where it is presented?
(2 marks)

TM354 June 2016 TURN OVER 9


(b) This part of the question is concerned with a system for recording dental
appointments. Figure 5 and Table 4 show respectively an analysis model for
the system, and a textual description of the use case make appointment.

Figure 5

Table 4

Identifier and
UC7 make appointment
name
Initiator Receptionist
an appointment is made for a given patient, with a given dentist, at a
Goal
given date and time
the given patient and dentist exist, and the dentist is available at the
Precondition
given date and time

The appointment will have been created and linked to the patient and
Postcondition
the dentist

(i) Consider the system operation makeAppointment, which has the


following signature
context Surgery:: makeAppointment (
patient: Patient,
dentist: Dentist,
dateAndTime: DateAndTime) : Void

Specify its pre- and postconditions.


(4 marks)

10 TM354 June 2016


(ii) Draw a sequence diagram for a collaboration to fulfil the postcondition
of the operation makeAppointment, taking surgery, an instance of
Surgery, as the system object. You will need to invent suitable names
for the operations required. You do not need to show the types of the
objects.
(6 marks)
(c) Patients arriving at a dental surgery can use a touch screen system to check
in. The patient identifies themself by selecting their gender and their date of
birth.
Table 5 below is an incomplete version of a specific usability scenario for the
system. Suggest suitable entries for each of the cells in the third column,
assuming the user is a patient using the system for the first time.
You do not need to copy the table but simply give the actual value
corresponding to each row by number 1 to 6.

Table 5

Part of scenario Type of value Actual value

1. Source end user

2. Stimulus user wants to:


-- learn to use
system quickly
3. Artefact system

4. Environment using system

5. Response supporting
learning
6. Measure task time

(3 marks)

TM354 June 2016 TURN OVER 11


(d) An operation to calculate travel expenses is specified as follows.
context: Company::calculateTravel(
distance : Integer)
pre:
-- distance is an integer greater than zero
post:
-- if distance is less than 101 the operation returns
distance multiplied by 0.4
-- if distance is between 101 and 200 inclusive the
operation returns distance multiplied by 0.4 plus a
travel distance fee of 20
-- if distance is 201 or more the operation returns
distance multiplied by 0.4 plus a travel distance fee of
40
Suppose you are asked to design black-box tests for this operation and are
allowed only six tests. Say what tests you would choose, in order to
maximize the probability that any faults are detected, giving a brief rationale
for each test. Assume design by contract (DbC).
(4 marks)

[END OF QUESTION PAPER]

12 TM354 June 2016

Você também pode gostar