COMPSCI5059 software engineering Final Exam
This question concerns software testing.
(a) Explain the difference between validation and verification of software products.
Copyright By PowCoder代写 加微信 powcoder
(b) Explain black box testing and provide a reason why you might use black box testing instead
of white box testing.
(c) In Agile software methods, testing is completed throughout development. Describe two
strengths and/or weaknesses of completing testing in an Agile process.
(d) Consider the following specification for a java program that manages a lift.
The lift API has three methods that manage the lift operation in a class called Lift. The lift
class maintains a list of floors to visit.
addFloor (int floorNumber) adds a floor to visit to the list of floors.
visitFloor (int floorNumber) removes a floor from the list of floors once it has been
getFloorList () returns an array of floors to be visited.
The floor list must be managed with the following constraints:
1. If a floor number is already on the floor list it should not be added again.
2. If a floor is visited, it must be removed from the floor list.
Write JUnit style test cases, including defining sample data, to test that these two con-
straints are handled correctly by the lift system.
This question is about object-oriented modelling with UML. Consider the following sce-
nario and then answer the question below.
You have been appointed as the software engineering consultant to design a new
wishlist system for birthday presents. Users can create wishlists of items drawn
from a central inventory. Users can add or remove items on their wishlists. Each
user has a name, an integer id, a birthday and zero or more created wishlists.
Each item has a name and a price. Each wishlist has a list of items, a list name
and an owning user. Wishlists can be private (only visible to creator) or public
(visible to all users). The inventory contains all items currently in stock. The
Administrator (super-user) is able to add and remove items in the inventory.
(a) Draw a UML class diagram to represent the various entities in this system. Show in-
heritance relations and associations (including multiplicity) between classes and include
relevant attributes and methods for each class.
(b) If the administrator removes an item from the inventory, then the system should also ex-
amine all wishlists to check whether they contain this item, and edit the wishlist to remove
the item if it is present. Draw a UML sequence diagram to represent the flow of messages
(method calls) for this operation.
(c) In your opinion, is UML a useful tool for software design? Give reasons to justify your
answer. You might want to consider issues like tooling support, software development
practices and standardization.
This question is about design patterns.
(a) Software design patterns are used to describe solutions to commonly recurring software
design problems. What are the key features of a software design pattern description?
(b) Give an example description of a software design pattern. You may describe a pattern
covered during the course, or a pattern you have learned about elsewhere.
(c) A software development team is working on the development of a railway timetable man-
agement system. The system is used to plan the movements of trains in a schedule and to
provide real time information on the movement of trains to staff and passengers. Part of
the source code for the system is shown below.
public class Journey
private Train train;
private Employee conductor;
private Employee driver;
private List
private int
numCarriages;
private RouteStop currentDestination;
class RouteStop {
Station station;
Date time;
The team are addressing two design problems:
() The team are concerned that a lot of information is duplicated between objects repre-
senting train journeys. For example, all train journeys re-occur on a weekly basis and
stop at the same stations, and the number of carriages for a journey is the same from
week to week.
(i) Notifications of the status of train journeys need to be passed to several different sub-
systems. For example, the rolling stock management system needs to know if trains
have reached a particular location on time, and there will also be a system for notifying
customers by text message if a journey has been delayed.
For each problem, name a design pattern as a suitable solution. In each case, describe how
the design pattern is instantiated for the specific scenario (you may use pseudo-code or a
UML diagram, if appropriate) and briefly explain why you selected the pattern.
(d) Why is the use of design patterns considered to be good software engineering practice?
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com