G6046-无代写
时间:2023-08-07
Candidate Number
G6046
THE UNIVERSITY OF SUSSEX
BSc SECOND YEAR EXAMINATION
May/June 2022 (A2)
SOFTWARE ENGINEERING
Assessment Period:
DO NOT TURN OVER UNTIL INSTRUCTED
TO BY THE LEAD INVIGILATOR
Candidates should answer TWO questions out of THREE.
If all three questions are attempted only the first two answers will be marked.
The time allowed is TWO hours.
Each question is worth 50 marks.
At the end of the examination the question paper and any answer
books/answer sheets, used or unused, will be collected from you before you
leave the examination room.
Do not write any answers on the question papers. All answers should be
written in the answer books.
2
G6046 Software Engineering
1. Massive Dynamic Corp has provided you with a text statement of their user
requirements for a project. The text statement reads as follows:
“Massive Dynamic Corp is a technology company that develops innovative
solutions using Artificial Intelligence. They want to commission a new system that
allows music fans to listen to new music and link up with other music fans with
similar music tastes. So this is part a music streaming service and a part music
social media platform. The new system will be called “MassiveMusic OnLine”.
Customers will need to register to use MassiveMusic OnLine and provide their
name, physical address and email address. They will also need to provide a
credit card number in their name to prove they are at least 18 years old, for data
protection and legal reasons. Once they have signed up they can search through
the MassiveMusic library. To search the library they can specify any combination
of artist name, music track title, year of release, genre (e.g. “rock” or “folk”) and
their own personal mood. The MassiveMusic system will then return suggestions
for the track and the users can then select that track for play. Tracks can be
played immediately, or queued in a playlist. Once a track has been streamed for
more than 10 seconds, a note is made in a database that the user listened to that
track. Tracks will be streamed at a minimum of 300kb/s, up to 500kb/s.
For the user social media page, they will be able to upload their own still images.
For image upload, the resolution must be no less than 500 x 500 pixels and no
more than 2000 x 2000 pixels. JPEG image formats must be supported, but it
would be helpful to support TIF and PNG also. Customers can upload up to 100
images. They can also make posts of up to 200 characters and invite other users
to be able to see their posts and recent tracks played (up to the last 50 tracks).
The system will look at the playlists of a user’s friends, and suggest tracks from
their friends’ playlists where the tastes are similar.
The system interface must offer all functionality across Mac and PC platforms
and must work on Microsoft Edge, Chrome and Safari browsers. Ideally the
interface would conform to ISO-IEC 40500 for accessibility. The interface must
work on both desktop and mobile devices (phone and tablet). Ideally there could
be an app store version for both Apple iOS and Android.
The core software will be built using Java although the front end interface should
be built using an appropriate front end technology. As this is a key piece of
business software, it must offer a mean time between failure of no less than one
in 1,000 hours, but closer to the one in 4,000 hours would be preferred. Ideally
the system should be 100% reliable as we have an excellent industry reputation
to maintain. The software should be easy to use for all age groups. Back end
persistent data storage will be provided using a SQL server. The tone and style of
the site needs to be consistent with our core company values.”
3
Working from this statement of user requirements:
a) State two mandatory functional requirements and two desirable functional
requirements.
[8 marks]
b) State clearly two mandatory non-functional requirements and two desirable
non-functional requirements.
[8 marks]
c) Give an example of a domain requirement and explain what needs to be done
with the domain requirement so that it can be acted upon.
[8 marks]
d) MassiveDynamic Corp’s project management team have no technical
development experience, and have decided to specify Java as the
development language as they think it will be simpler to create an Android
mobile version of MassiveMusic (and that was stated in their user
requirements. They have opted to use SQL for back end persistent data
storage as that is what the company already use to manage customer data for
other non-music parts of their business. They have asked you to provide your
technical opinion on their selection of technologies. What advice might you
give them? Your answer must explain the reasons for your advice.
[8 marks]
e) The statement of user requirements from MassiveDynamic Corp is all the
information that the company have provided for you to guide your
development team. They do have a good project management team though
who are keen on the development and the benefits it can bring the company,
and a good idea of what makes for a good shopping experience. What
development process model do you think would be appropriate for this
project? Your answer should include your reasons (up to 8 marks for four
clear reasons), and a description of the key elements of the selected software
development process model (10 marks).
[18 marks]
/Turn over
4
G6046 Software Engineering
2.
a) Explain what is meant by the term “software design pattern”. Provide one
example of such a software design pattern and explain what advantages it
gives in the software development process. You may find it helpful to use
diagrams to support your answer.
[10 marks]
b) A project is to be executed using a planned Waterfall development process.
Using the information in the table below, assuming that the project team will
work a standard working week (5 working days in 1 week) and that all tasks
will start as soon as possible:
Task Description Duration
(Working days)
Predecessor(s)
A Hire project managers 5 None
B Requirements analysis 25 A
C Prototype design 20 B
D Create final design 20 C
E Hire coding team 15 A
F Buy hardware 15 C
G Coding 35 E, D
H Hardware testing 30 F
I Software testing 35 G
J Hardware and software
integration
15 H, I
K Delivery 5 J
i. Produce a PERT analysis of this project (showing the earliest and
latest start and finish times) and determine the critical path of the
project, and state the planned duration of the project in weeks.
[10 marks]
ii. Identify any non-critical tasks and the float (free slack) on each.
[5 marks]
c) A software Object Oriented Programming class has been developed as part of
a solution for a problem. The class has a method with the following signature:
5
public boolean validateCustomerDetails
(String name, int age, float balance)
This method validates some details for a shopping cart. It takes the full name
(first and last name) of the customer, their age and a cart balance (amount of
money available to spend). A developer wants to develop a testing strategy, in
particular a set of unit tests to ensure that the method works correctly. When
the method determines that an error has occurred, it returns a value of false,
otherwise true is returned.
With reference to the concepts of “partition testing” and “guidelines based
testing”, suggest a set of unit tests that would determine whether this method
was likely functioning correctly. You do not need to provide any unit testing
code, just a description of the nature of the test, and the input and expected
outputs with an explanation of the reason for the test. To get the full marks,
you should properly define no less than six suitable tests.
[15 marks]
d) A Java class has been developed to represent a film, with some basic details
and the feature to upvote and downvote the film depending on whether
viewers like it or not. The class is as follows:
public class Film
{
private String name;
private int ageLimit;
private int lengthMins;
private int votes;
private boolean isReleased;
/**
* Constructor method
*/
public Film(String name, int ageLimit, int lengthMins) {
this.name = name;
this.ageLimit = ageLimit;
this.lengthMins = lengthMins;
votes = 0;
isReleased = false;
}
public String getName() {
return name;
}
public int getAgeLimit() {
return ageLimit;
}
public int getLengthMins() {
return lengthMins;
}
6
public boolean getIsReleased() {
return isReleased;
}
public int getVotes() {
return votes;
}
/** @return true is film goes on new release, false
* if the film was already on release.
*
*/
public boolean releaseFilm() {
if (isReleased == false) {
this.isReleased = true;
System.out.println("Film now on show");
return true;
}
else {
System.out.println("Film already out!!");
return false;
}
}
/** @return true is film becomes withdrawn from release, false if it
* was already withdrawn.
*/
public boolean withdrawFilm() {
if (isReleased == true) {
this.isReleased = false;
System.out.println("Film no longer on show");
return true;
}
else {
System.out.println("Film not on show currently!!");
return false;
}
}
/** @return number of current votes for this film.
* You cannot vote for
* a film that is not currently on release.
*/
public int upVoteFilm() {
if (isReleased == true) {
votes++;
}
else {
System.out.println("Cannot vote for unreleased film");
}
return votes;
}

/** @return number of current votes for this film.
* You cannot vote for
* a film that is not currently on release.
* Vote count cannot be negative.
*/
public int downVoteFilm() {
if (isReleased == true) {
if (votes > 0) {
7
votes --;
}
else
{
System.out.println("Cannot be less than 0");
}
}
else
{
System.out.println("Cannot down vote for unreleased film");
}
return votes;
}
}
Write a Java Junit test class to perform the tests specified below. Minor syntax
issues will not be penalised.
• Create a film called “Dune”, minimum age rating is 15 years old and the length
is 156 minutes. The film is initially unreleased.
• Check that the name is “Dune”.
• Check that the running time is 156 minutes.
• Release the film and check the film is released.
• Release the film again and check that the film was known to have already
been released.
• Upvote the film 1 time and check that the number of votes is 1.
• Downvote the film 1 time and check that the number of votes is 0.
• Upvote the film 10 times. Check the number of votes is 10.
• Withdraw the film and check that it is withdrawn.
• Try to up vote the film and check that the number of votes remains at 10.
• Try to down vote the film and check that the number of votes remains at 10.
[10 marks]
/Turn over
8
G6046 Software Engineering
3. Consider the following informal requirements specification for a computer system:
“The Dunham and Bishop Wholesale Company (DBWC) has decided to replace their
outdated stock control and retail system. DBWC sell a wide range of products
including shrub plants, shovels and wheelbarrows. Customers can buy goods
directly in the store or order them by telephone or on-line for collection instore. Data
needs to be stored on each of the items that DBWC sell, effectively providing a
catalogue of all the items that are stocked, although not the actual stock levels
themselves at this stage. Each item has a unit price expressed in pounds and pence,
a numeric reference to a supplier and a product code for that supplier. One supplier
may be responsible for supplying any number of products to DBWC. Shrub plants
need to have their Latin name stored, along with data to indicate whether they are
indoor or outdoor plants. Shovels come in different materials such as wood or steel,
and different heights and weights. For a wheelbarrow, the height in cm needs to be
recorded along with the material that it is constructed from and the safe maximum
loading weight.
In order to make an order, customers need to provide their name, address,
telephone number and an email address. They also need to let DBWC know whether
they are happy to receive the new monthly newsletter, and if so whether they would
like to receive it by post or by email. Customers can order as many items for
collection as they like at any one time. However, sometimes there can be delays in
processing orders due to delays in delivery from the suppliers. So it is important that
if a customer calls up to ask about progress of a delayed order, that customer’s order
can be brought up on the computer system based on the customer’s last name.
Ideally, the computer system would keep a record of all of the orders that the
customer has ever made.”
a) Identify the main object classes involved in the system, and for each class
briefly describe the primary attributes and operations/methods associated
with it.
[25 marks]
BestShopper is a new price comparison application that aims to deliver great prices
for students purchasing a computer for their University studies. BestShopper do not
sell products themselves, but are selling products on behalf of 3 other provider
companies: Pear Computing, Ensor Tablets and Zintel. The new BestShopper
application is intended to be a mobile application where students can enter search
terms/parameters (CPU speed, storage space and whether a laptop is preferred) for
the items they want, and then get various prices for suitable products. Students can
then browse the various product options, with a view to purchasing one later.
A UML context diagram for this scenario is shown below:
9
The team that are developing the BestShopper application have identified some
appropriate Object Oriented (OO) classes as shown in the class diagram below for
Student, Computer and Quote. It is just one of many possible solutions. Students
can make many quote requests for different specifications.
b) Draw a UML sequence diagram to represent a student getting and viewing
a quote for a new computer. This should include creating the specification
for the computer, getting the quote for it and viewing details for one of the
computers. You can assume that the student is already registered as
necessary with the system. You can assume that the
getExternalQuoteData() method in the Quote class takes care of the
details of communicating with the external insurance provider companies.
10
The requestQuote() method in Quote returns a Quote object. The
Computer() method in Computer is a constructor method. The three
select methods in Quote allow us to set the desired specification for the
computer we want to get a quote for,
[15 marks]
c) Data needs to be exchanged between the BestShopper system and the
external data providers. But each of the external data providers have very
different hardware and software systems. Explain how this problem of
communication between these different systems can be overcome. Your
answer should include a high-level description of the technology required,
and an example using that technology of how information can be
exchanged. For example, how a request for a quote can be sent from
BestShopper to an external data provider.


essay、essay代写