Which change the status shipment and alter the attributes size
1
Scenario: Shipment Management System (SMS)
You have been approached by Shipment R Us (SRU), an innovative start up
firm, willing to develop Shipment Management System (SMS) software and
sell it to logistics companies.
During the registration, a private customer (i.e. members of
the public) must provide: a. First and Last names
b. Date of Birth
c. An address
d. An email address
In case of a business customer, the registration details
required are:
• Company Name
• An address
• An email address
• A VAT number
The shipment price consists of a basic price and may also include additional charges. The basic price depends on the parcel’s weight, size and distance to destination. Weight is expressed in kg, size is either “small” or “large” and the distance is “domestic delivery” or “overseas delivery”. A basic price per kg is 5 euros for “small” parcels and 10 euros for “large” parcels. The customer can choose between “standard” and “express” delivery. The “standard” delivery takes up to 7 working days, the “express” delivery is completed within 2 working days. The price of “express” delivery would incur a 10% surcharge in comparison with the “standard delivery”.
The customer is offered a number of options to pay. The payment can be immediate or deferred. A shipment is confirmed only when a full payment has been received. Until then, the parcel is held in the warehouse as unconfirmed. Shipments are assigned a unique identification number. When payment is received, an email is sent to the customer confirming the payment.
Offers
The marketing manager can apply a special offer for a shipment class
(standard/express, small/large, domestic/overseas) in the form of a
discount from 5% to 10% on the final price (including surcharges). Every
offer only applies to the particular shipment class. Offers are
time-limited (up to date/time) and once specified in the system, are
automatically applied by the system when payment amount is
calculated.
Data Requirements
oThe system must save in a database all the information about:
registered customers,
offers, and
shipments.
oFinally, in design you must add classes from the solution domain. You are expected to demonstrate your understanding about how in design we mix problem domain classes (which are shown in the analysis model) and classes from the implementation domain by addressing the following three aspects:
Assume that the SMS software uses a local database (e.g. the popular embedded SQL Lite or a more advanced RDBMS such as PostgrSQL) to store the relevant data. Provide a minimalistic design of database connectivity, which includes: an interface for database access to store/retrieve data from the classes in the Shipment subsystem to a database of choice, and
an implementation class that realizes the above interface (you can refer for examples to the lecture notes and to the model answers of the Tutorial on system design);
You are also expected to show which problem domain classes will be using/accessing database connectivity. If necessary, you can add helper classes to simplify the database access.Design the communication between the Shipment subsystem and the other subsystems, e.g. with the classes which belong to the Accounts and Payment packages (subsystems). You may define an interface, provided by the Shipment subsystem, which the other sub-systems will use to access the functionality of the Shipment subsystem. You may also need to define “required” interface(s),
(50 marks)
Question 2: State machine
Now consider a fragment of a class diagram, which models the class
Shipment.
- “price” – the price of shipment.
- “summary” – a brief description of the content of the shipment.
class (e.g. setDistance(), etc.). Each of the changes will lead to recalculation of the price: the attribute price will be assigned a new value, which will be calculated by calculatePrice().
Develop a behavioural state machine diagram, which models
the work of an instance of the class Shipment. The diagram should
show:
- the states of an instance of Shipment together with the
actions (entry/exit) and activities (do) associated with each of the
states the instance may be in,
- the transitions between the states with their events
(triggers), guards and actions.
(25 marks) |
---|
SMS Software shall be accessible via a web browser and the developers are encouraged to optimise the application for access from a mobile device using the latest version of the popular JavaScript library, JQuery.js.
The printing service is run on a separate computer (HPPrinterServer) and the communication of JBoss with this computer uses an “HP protocol”.
1 According to the J2EE specification a web-application is deployed as a “web archive”. See for further detail.
6
Hint: Please note that testing addItem() must check that a new Shipment object has been created, i.e. that the number of items held in the shipment history has increased. More detailed tests may include that the new object of type Shipment is not merely created, but that it contains the details of the shipment passed to the method as parameters (e.g. size, distance, etc.).
b)The specification of one of the use cases of SMS Software, “SubmitParcelForShipment”, is shown below.
|
---|
Alternative flow: PaymentDeclined |
|
Based on this use-case specification, and using the template provided in the module (see Lecture 9) develop a set of test cases, which test all branches of the use case:
Remember that test cases are not merely a repetition of the use case specification, but should provide:
- |
|
---|
repeated, if necessary, by a party other than the tester themselves. Again, as an example,
9
Appendix
- | |
- |
|
- | A number of entity classes capture the main abstractions from the problem domain. |
4) I suggest that you do not even attempt to work right up to the deadline and instead recommend that you get your submission in well before the cut-off time. The last thing you need is the stress and worry of watching the clock tick and then encountering a problem that delays you. It can and does happen!
Late submission policy
In accordance with the usual policy on coursework submission, late submission will receive 0% unless there are extenuating circumstances with supporting evidence, which must be notified to the Course Officer in advance of the deadline.UML Diagrams
You can install a copy of Visual Paradigm on your personal machine (Windows, Mac, or Linux) by following the instructions on Moodle. The current version of the tool is v.16.1.Note that you may come across variations in UML syntax on websites and within certain textbooks. This is of no consequence for the purposes of this coursework.