程序代写代做代考 compiler IOS junit Java C Excel flex database graph android Candidate Number

Candidate Number
THE UNIVERSITY OF SUSSEX
BSc SECOND YEAR EXAMINATION May/June 2019 (A2)
SOFTWARE ENGINEERING Assessment Period:
G6046
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 answer should be written in the answer books.

G6046 Software Engineering
1. TravelTechCorphasprovidedyouwithatextstatementoftheiruser requirements for a project. The text statement reads as follows:
“TravelTech Corp are a major supplier of hotel and accommodation booking services. We wish to develop a replacement for our existing bookings management system, to enhance the range of search and booking options to support a wide range of desktop and mobile platforms.
Customers can browse the booking system on-line to find hotel and accommodation bookings that meets their needs based on location, arrival date, duration of stay and number of guests. Location can be defined either by broad geographical area (e.g. Tuscany) or by specific city (e.g. Pisa). It would be useful if customer could select areas by recent popularity. Customers can set upper and lower bound costs on a per night basis expressed in either pounds or euros. A customer can create an account on the site and save their provisional bookings for a minimum of 1 month and ideally a maximum of 3 months. If any underlying prices change prior to confirming the booking, it would be helpful if the system could notify the customer by email. The account can also then be used to confirm any provisional bookings, when payment is made via a secure payment system.
The system interface must offer all functionality across Mac/PC and Linux platforms and must work on Explorer, 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 Appstore version for both Apple iOS and Android.
The software will be built using Java within a Jakarta EE framework. As this is business critical software, it must offer a mean time between failure of no less than one in 10,000 hours, but closer to the one in 20,000 hours would be preferred. Ideally the system should be 100% reliable as we have an excellent industry reputation to maintain. The software should ideally incorporate analytics so that senior management can remotely view how customers are interacting with system. The software should be easy to use, and a strategy needs to be produced to enable the migration of existing booking data from the existing old back end system to the new system on an agreed changeover date. The back end data storage is currently provided by a SQL database system and we have decided to move to a cloud based storage solution. ”
Working from this statement of user requirements:
a) State two mandatory functional requirements and two desirable functional requirements.
2 marks for each requirement. Answers should correctly use “shall” for mandatory requirements and “should” for desirable requirements.
2

Requirements should be SMART (Specific, Measurable, Achievable, Realistic and Time Bounded) where possible.
Possible mandatory functional requirements include:
• Customers shall be able to set upper and lower bound costs on a per night basis expressed in either pounds or euros.
• Customer shall be able to define location either by broad geographical area (e.g. Tuscany) or by specific city (e.g. Pisa).
• A customer shall be able to save their preferred provisional bookings for a minimum of 1 month.
Possible desirable functional requirements include:
• A customer should be able to save their preferred provisional bookings for a maximum of 3 months.
• If any underlying prices change prior to confirming the booking, the system should notify the customer by email.
[8 marks]
b) Stateclearlytwomandatorynon-functionalrequirementsandtwodesirable non-functional requirements.
2 marks for each requirement.
Possible mandatory non-functional requirements:
• The software shall be built using Java within a Jakarta EE framework.
• The system shall offer a mean time between failure of no less than one
in 10,000 hours.
• The system interface shall offer all functionality across Mac/PC and
Linux platforms.
Possible desirable non-functional requirements:
• The system should offer a mean time between failure of no less than one in 20,000 hours.
• The interface should conform to ISO.IEC 40500 for accessibility.
[8 marks]
c) Giveanexampleofadomainrequirementandexplainwhatneedstobedone with the domain requirement so that it can be acted upon.
Example domain requirements:
3

• The software should incorporate analytics so that senior management can remotely view how customers are interacting with system.
• The software should be easy to use.
• A strategy needs to be produced to enable the migration of existing
booking data from the existing old back end system to the new system on an agreed changeover date.
2 marks for identifying a domain requirement.
In each case, there is insufficient information to determine specific requirements. Further clarification, expertise and knowledge is required to understand what is meant by these domain requirements.
3 marks for explaining what a domain requirement is.
After further discussion and analysis, domain requirements need to be further refined into specific functional and non-functional requirements.
3 marks for explaining how to deal with domain requirements.
[8 marks]
d) Do you consider it reasonable for TravelTech to specify a 100% reliability metric for their booking system? You must provide reason(s) and justification for your answer.
Although it is reasonable as a statement of aspiration in a set of user requirements, it is not reasonable to specify 100% reliability as a non- functional requirement, as it cannot be achieved. (2 marks)
100% reliability would require unbounded amounts of testing. As faults become fewer in number, the cost of identifying and remedying them increases. 100% reliability would imply unbounded time and costs. (3 marks)
We cannot assume 100% reliability of tools used in the development that we did not build e.g. compilers and libraries. (3 marks)
[8 marks]
e) TravelTech have expressed a desire to move to a cloud based storage solution for their back end data. This desire carries comes with risk. With reference to this specific example, explain how a risk may be characterised, and suggest appropriate measures that the TravelTech team can adopt to minimise this risk
Characterisation of risk:
• Nature of risk: text description e.g. possible loss of access to data in cloud storage system.
4

• Chance of risk: quantitative or qualitative measurement e.g. down time less than 0.1% of total service time, or low/medium/high.
• Impact of risk: statement of consequence of risk e.g. severe – unable to conduct any business.
• Mitigation: What can we do to mitigate the effect of the risk e.g. switch to parallel on-line backup system.
• Monitoring: what steps so we adopt to monitor for the onset of the risk: e.g. automated monitoring systems, weekly meetings.
2 marks for each element.
In the case of the TravelTech example, use could be made of a duplicate cloud storage system, or even retain critical data using the old hardware system.
2 marks for a strategy.
[12 marks]
f) Give an example what is meant by an “organisational/people” risk and suggest what steps may be adopted to mitigate against it.
Specific examples of risk:
• Inability to recruit staff with the correct skills.
• Failure to retain staff with key skills.
• Poor management leading to loss or morale and poor productivity.
Any reasonable will suffice (3 marks). Any reasonable mitigation strategy will suffice, provided that it is related to the specific example given (3 marks).
Analysis of bookwork content:
[6 marks]
Question part
Marks available
Marks bookwork
1(a)
8
0
1(b)
8
0
1(c)
8
0
1(d)
8
8
1(e)
12
8
1(f)
6
6
Percentage bookwork: 22/50 = 44%
5
/Turn over

6

G6046 Software Engineering
2.
a) In the context of the Agile development process, explain what is meant by the
following terms:
• Agile manifesto.
• User stories. • Sprint.
• Pair wise programming.
Agile manifesto (4 marks):
Individuals and interactions over processes and tools. Working software over comprehensive documentation. Customer collaboration over contract negotiation. Responding to change over following a plan.
User stories (2 marks):
An expression of user requirement(s) expressed as a scenario representing a short example of some aspect of the required functionality that the customer wants to achieve. Not expressed in terms of functional and non-functional requirements, but instead in user centric story based terms.
Sprint (2 marks):
A block of intensive development in response to a user story/stories. Typically
lasts around 2-4 weeks under the direction of a Scrum Master. Pair wise programming (2 marks):
An idea from the Extreme Programming (XP) approach where 2 programmers constantly review and improve each other’s code.
[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:
T ask
Description
Duration (Working days)
Predecessor(s)
A
Requirements analysis
10
None
B
Initial design
10
A
C
Hire developers
15
A
D
Procure hardware
20
B
E
Coding
40
B, C
7

F
Code reviews
10
E
G
Hardware testing
5
D
H
Software testing
15
F
I
Hardware and software integration
15
G, H
J
Hire audit Team
10
A
K
Review
10
I, 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.
Task
Duration (days)
EST
EFT
LST
LFT
A
10
0
10
0
10
B
10
10
20
15
25
C
15
10
25
10
25
D
20
20
40
65
85
E
40
25
65
25
65
F
10
65
75
65
75
G
5
40
45
85
90
H
15
75
90
75
90
I
15
90
105
90
105
J
10
10
20
95
105
K
10
105
115
105
115
Critical path is: A, C E, F, H, I, K.
[10 marks] ii. Calculate the planned duration of the project in weeks.
Planned duration is 115 days – 23 weeks.
[5 marks] iii. Identify any non-critical tasks and the float (free slack) on each.
B: 5 days, D: 45 days, G: 45 days, J: 85 days.
1 mark for identifying tasks, 1 mark each for correct float.
8

[5 marks]
/Turn over
c) Explainwhatismeantbya“designpattern”,andhowthisideahelpsusto produce better software engineering solutions. You should include an example of one design or architectural design pattern in your answer, including an explanation of where it might be used.
Definition should include following elements
• A common and well established means of solving a problem,
• Represents cumulative expertise in solving a problem.
• Provides a common vocabulary for describing the problem.
4 marks for the definition.
Examples of software patterns include:
• Façade.
• Adapter. • Observer.
Examples of architectural patterns include: • Client/server.
• Model View Controller.
6 marks for the pattern – 3 marks for a basic description of the pattern, and 3
marks for any reasonable example of its use and application.
[10 marks]
d) A key feature of Enterprise scale framework based solutions is the concept of container managed services. The Java Jakarta EE framework provides the Java Persistence API (JPA) to support Object-Relational Mapping (ORM) between Java objects and a relational database. Explain what is meant by “container managed services” in the context of ORM as a means of providing persistent data storage, and explain clearly the advantages of such an approach over a 3-tier architecture implemented using PHP and SQL.
A container is a run time server environment where Java code can be executed. The Jakarta framework has both web and enterprise java bean containers where JPA can be managed. JPA is a persistence unit technology (specifically a library class) that allows for persistent data objects to be represented as annotated plain Java objects. The JPA offers methods to create, manipulate and query these objects in the manner of a relationship
9

database. The actual database storage is provided externally to the container. The container uses an XML mapping configuration to translate (map) the Java objects onto the relational database. This mapping is provided by the ORM. The container can be reconfigured at run time, so that the implementation of the persistent data storage is decoupled from the container code base. The container can be reconfigured to use different data storage technology providers and services, allowing for reconfigurable and distributed services.
The Java entity beans require annotation to provide the JPA with basic information such as the primary key. JPA only supports relational database mappings.
The JPA approaches decouples entity code from the persistent data storage, permitting flexible and reconfigurable data storage. Containers can also be configured for distributed multiple server load balancing. Typical 3 tier applications offer a single web server and single persistent data storage, and the queries are hard coded into the application logic code, thereby limiting their performance at the enterprise scale.
6 marks for the definition and 4 marks for the comparison with the 3-tier approach.
Analysis of bookwork content:
[10 marks]
Question part
Marks available
Marks bookwork
1(a)
10
10
1(b)
20
0
1(c)
10
5
1(d)
10
6
Percentage bookwork: 21/50 = 42%
10
/Turn over

G6046 Software Engineering
3. Considerthefollowinginformalrequirementsspecificationforacomputerised ticket sales system:
“LastMinuteTickets is a company that sells last minute ticket bargains for popular arts events. They sell theatre tickets, concert tickets and VIP tickets for museum viewing events. They want to build a new computer system to manage their ticket sales.
Customers must register to use the new system. To register, customers need to provide their name, age, telephone number and email address. The company then needs to verify these details before a customer can make any purchases, to prevent their system from abuse from ticket touts. Once the customer has been verified, they are free to make as many purchases as they like.
Theatre tickets are for a specific show, theatre location (e.g. “London Apollo”), time and seat number (one letter and two integers). Concert tickets are for a specific show, and can be allocated seating (also one letter and two integers) or standing. Some concerts are for over 18s only. Some concert tickets have restricted views due to old venues. VIP tickets for museum viewings have a name of the event, the name of the museum where the event is taking place and a starting time. Some museum events also have sandwiches and/or drinks available.
Customers can browse LastMinuteTickets range of bargains (you do not need to know how this is achieved), and then make purchases. Once the purchases are made, LastMinuteTickets needs to keep a record in case the customer loses any of the information about the bookings they have made. To help customers in that event, LastMinuteTickets need to be able to recover information about customer purchases using the customer name on their system.”
a) Draw a use case diagram for this system.
One possible example:
11

b) Identify the main object classes involved in the system, and for each class briefly describe the primary attributes and operations (methods) associated with it.
General marking guidance as follows:
A possible solution might be:
[5 marks]
Range
Criteria
0-3
Very little answer given. At the higher end, at least one cohesive class has been identified. No coupling shown. No class diagram shown.
4–6
The start of a meaningful answer has been given. At the higher end, two cohesive classes have been identified with relevant coupling shown between them.
7-9
At least two cohesive classes have been shown, with at least some relevant methods to show key functionality. At the higher end, there may be an attempt at a class diagram.
10-12
At least 3 cohesive classes shown with relevant attributes and collection shown. At the higher end, there is a relevant class diagram and/or an attempt to show how collections are used to link classes together.
13-16
Towards a substantive solution to the problem. There may be some smaller issues, but the solution is substantially correct. At this level, the use of a common parent class for all stock items should have been identified.
17-20
A high quality solution that meets all of the requirements.
Class
Attributes
Methods
LastMinuteTickets
ArrayList
allEvents
HashMap
records
verifyCustomer(…)
findRecords(…)
Event
Date time
12

Theatre extends
Event
String show
String seatRef
Concert extends
Event
String show
boolean allocatedSeating
boolean restrictedView
Boolean ageRestricted
Museum extends
Event
String name
String museum
boolean vipEvent
boolean sandwiches
boolean drinks
Customer
boolean isVerified
String name
String telephone
String email
ArrayList
myEvents
buyTicket(…)
13
[20 marks]
/Turn over

c) Drawaclassdiagramshowingtherelationshipsbetweentheclassesyou identified.
Class diagram will depend on precise classes defined by student. The class diagram should show:
• All classes identified in part (b).
• Associative links between the classes.
• Super/sub class relationships where they exist.
[10 marks]
d) Using one of the classes you identified in your previous answers, explain how unit testing can be utilised in Java as the basis of automated testing. Your answer should include outline Java code to support your explanation.
Answer should provide an outline definition of unit testing using JUnit classes that provide automated means of creating objects, and calling methods and comparing expected outputs with actual outputs. Students should mention that the testing classes do not form part of the main codebase, just a means of testing classes. Testing several classes together is referred to as component level testing. Testing an entire application is referred to as system level testing. Students should mention the need for Java annotations, at minimum the @Test annotation used to mark specific testing methods, and the assertEquals() method use to validate method output.
5 marks for the broad definition of unit testing. 5 marks for any code example that resembles an annotated unit test class with at least one annotated testing method and use of assertEquals() method. Code syntax does not need to be precise.
Analysis of bookwork content:
[15 marks]
Question part
Marks available
Marks bookwork
1(a)
5
0
1(b)
20
0
1(c)
10
0
1(d)
15
5
Percentage bookwork: 5/50 = 10%
14
End of paper