Sheet 1 - With Answers
Sheet 1 - With Answers
Q1- Which of the following sentences is correct and which are not and justify your answer
Showing your customer a mockup of the UI is one good way to get feedback while
gathering requirements. False
For an announcement within your team, email is more appropriate than making the
announcement during a meeting. False
Cohesion refers to elements in the same module, whereas coupling refers to elements
in different modules. True
When designing tests, if partitions are chosen perfectly, there is no point to testing
boundary values near the edges of the partition. True
Q2- The later a problem is found in the software development process, the harder it is to fix.
Explain why, in one sentence.
• Other work may be built on a flawed foundation, so correcting the original problem may
require significant rework.
• If the software has already been widely distributed, it might be expensive to get a fix
out.
• The developer(s) involved might have forgotten the context surrounding the bug, so it’ll
be harder to fix.
• The bug might be located in any existing code, and there’s more to search through as
time passes.
Q3- After you find a bug but before fixing it, you should create a test case for it. In one
sentence each, give three reasons that this is a good idea. Give reasons that are as distinct as
possible.
• Ensures that your fix solves the problem. Don’t add a test that succeeded to begin with!
A related reason is to avoid writing a test for a bug that you fixed, but that isn’t the
problem indicated by the original bug fix.
• It helps you understand the bug and define the desired system behavior. (“It documents
the bug” or “it informs others of the bug” is wrong, because it is the purpose of your bug
tracking system to document your bugs. If you meant something different, such as the
good answers listed here, then please be more specific.)
• It helps you know when you are done with bug fixing. A related reason is repeatability,
and efficiency when debugging: the test is easy to run in an automated way to
determine whether your fix works.
Q4- As a Software Engineering consultant, you have been asked to advise a small company on
the advantages and disadvantages of using an externally provided payroll system provided as
a software service. In your answer, outline both the advantages and disadvantages to the
company.
Answer:
We have different point of views for this question, so I will leave it to you.
Q5- Draw a UML Class Diagram representing the following elements from the problem domain
for a hockey league. A hockey league is made up of at least four hockey teams. Each hockey
team is composed of six to twelve players, and one player captains the team. A team has a name
and a record. Players have a number and a position. Hockey teams play games against each
other. Each game has a score and a location. Teams are sometimes lead by a coach. A coach has
a level of accreditation and a number of years of experience, and can coach multiple teams.
Coaches and players are people, and people have names and addresses. Draw a class diagram
for this information, and be sure to label all associations with appropriate multiplicities.
Q6- A company hires out tools and equipment (for example drills, power saws, cement mixers,
ladders, scaffolding) to customers and requires a computerised system to record details of
bookings. Equipment may be booked in advance, or customers may appear at the reception
desk and ask if there is an item available for immediate hire. When dealing with a booking or
allocating an available item to a customer, the receptionist has to check whether the customer
has previously hired equipment from the company or is a new customer. For a new customer,
the receptionist has to enter the customer's details. Otherwise, the receptionist has to retrieve
the existing customer's record and update any details if necessary. The minimum period of hire
is one day and all hires are made for a number of complete days. The return of an item at the
end of the hire period is recorded by the receptionist, or by a technician if the reception desk is
closed. The manager of the company requires a summary of the status of all equipment at the
beginning of each day, giving details of: items out on hire, items booked and items that will be
available for hire that day.
a- From the description, identify functional and non-functional requirements for the
system.
b- Draw a use case diagram describing the main functions of the system.
c- For each use cases, draw an activity diagram to show how an actor will interact with the
system in order to complete the use case.
Answer
Functional Requirements
Non-functional requirements
The fact that a hire is for a whole number of days could be seen as a non-functional
requirement; alternatively this could lead to a new functional requirement to allow the
minimum hire period to be specified. But probably the restriction to whole numbers of days
would permeate the system when we get on to more detailed design, so it makes most sense as
a non-functional requirement.
Missing requirements
It is possible to think of many functional and non-functional requirements that are likely to be
important in a system of this kind. Functional requirements could include recording damage to
tools, allowing regular repeated bookings, recording late returns and penalties, changing or
cancelling existing bookings, and no doubt many others. Of course there is the whole area of
handling payments, but the question explicitly said that this is not included. Obvious non-
functional requirements would be compatibility with an existing computer system and the kind
of user interface required.
User Cases
Make Booking: accept booking for tool from customer; may be new or existing customer
Record Hire: confirm booking or record immediate hire; customer for immediate hire may be a
new or existing customer
Check Customer: check records for existing customer and update details if necessary; if no
record exists then we have the extension
Add New Customer Add New Customer: allows a new customer to be added (this could be a
separate use case included in Make Booking and Record Hire, or it could be included within
Check Customer)
Request Summary: provides the daily summary required by the manager; as this is a regular
report it could be initiated by a system timer rather than by a user request