Starting from:

$25

CPEN333 - Systems Software Engineering - Assignment 2 – Using UML - Solved

Part A – Capturing requirements with a USE-Case Diagram
Imagine we have been given the task of writing software to computerise the traditional paper-records or spreadsheet approach of running a University such as UBC. Think about the users of such a system (e.g. Prof, Admin person or Student) and what they would want to be able to do from such as system (and where information would be stored). Some suggestions are listed below, but you could add/amend these. Choose at least 4 but those choices should include 2) and 8) below (for use with Part B)

 

1.    Enrol at UBC into Engineering Year 1 (think about what happened to you all the way through year 1)

2.    Selection and admittance into a year 2 program 

3.    View and register for courses in T1 or T2 (or summer) and pay tuition fees

4.    Assign a Prof to a course and let them create their assessment proposals e.g. labs, assignments, quizzes, mid-terms etc. including grades and must pass criteria etc. (make up some reasonable rules)



6.    Adjudicate the eligibility of a student to graduate from year 2 to year 3 and year 3 to year 4 etc. (what are the rules about this).

7.    Graduate (or not) a student at the end of the program (lots of checks involved here)

8.    President suspends student for 1 or 2 terms (or indefinitely) based on number of incidences of cheating in a course while at UBC. This requires that students be banned from registering during suspension, a zero is entered in the course and a record of the incident is entered on their transcript and recorded in Deans office

 

 

Think about the UBC business rules and regulations that determine the success or otherwise of these requirements, for example:-



·         What are the pre-reqs for admittance to year 1 engineering?

·         What about registering for a course (pre and co-reqs etc)? 

·         What are the requirements for graduation after year 4? 

·         How many students can enrole in a course? 

 

Who would you interview to discover how each of these processes work (who are the domain experts).

 

Think about who the stakeholder are:- Students, Profs, Senate, Faculty Admin and think about what they want from the system. Now draw as complete, detailed and thorough a use-case diagram as possible using Visual Paradigm to capture these use-cases and identify any APPROPRIATE relationships between them. You should fully document your use-cases along with any interesting scenarios and full descriptions of any items of data. For example 

[Student ID =  Number, 8 digits]

[Name = String, 24 chars]

 

Also document any algorithms or equations etc. 

 

Think about who the primary users are i.e. those who initiate the action, and secondary users who happen to be involved in it, i.e. there is some interaction required of them.

 

Remember your focus at this stage is about documenting "what" will happen, rather than "how" it will happen in the finished system. There should be no technical stuff in here, you should be able to show your use-case model (including descriptions) to someone at the university and he/she should be able to understand it and sign off on it.

 

Marks will be awarded for the completeness of use-case step-by-step descriptions, data, any relevant business operational rules and the correct and appropriate use of the UML diagram syntax and relationships. There should be clear evidence that each of your use-cases passes the 3 tests required of any use-case. 



1)    It documents a step by step interaction between the user and the system (i.e. the user must be involved)

2)    It documents the benefit to the user and

3)    It documents the effect on the system of that interaction

 

            (20 marks)

 

 

Part B – Capturing Use-Case Behaviour using a Sequence Diagram

 

Using uses cases 2 and 8 above, plus 2 more of your own choice and using the approaches identified in Lecture 22 and 22a (Architectural Modelling and Object Identification Techniques) identify and document a set of Interesting or relevant objects (using nouns analysis) from which your system will be composed think also about classifying them as per that same lecture, e.g. active, passive, persistent, physical device etc.

 

Now think about the roles and responsibilities of each object. What is its overall role in the system? Try to summarise that in a sentence or two. What actions can other objects ask it to perform (i.e. its responsibilities)? 

 

For example in the case of a linked list object, its role might in the system be to store and retrieve data on behalf of other objects. To realise this role, the designer of the linked list might provide insert(), delete() and find() functions which are actions other objects can ask it to perform.

 

Now, using the material of lecture 23, draw a separate sequence diagram for each of the 4 use cases. These should clearly show the user (i.e. who initiates the use case), a set of collaborating objects involved in realising the use-case and a set of messages that will propagate between these objects as they attempt to implement the use-case description. A message implies one object asking another to perform a task or carry out an action related to its roles or responsibilities in the system. It follows from this that messages must therefore have a verb in their name.

 

You should also document the sequence diagram with “stick it” notes, appropriate “alt”, “opt” type frames and/or comments down the left hand side of the diagram to show if/then/else type decisions.

 

Some messages require parameters, others don’t, so document appropriately. In addition consider the type of message that is appropriate, e.g. synchronous or asynchronous and draw appropriately. 

 

(20 marks)

 

Part C – Classes, Class diagrams and Class Relationships

 

Towards the end of lecture 23 you were shown an elaborate sequence diagram that captures the behaviour of a set of collaborating objects as they attempt to realise a use-case description of what happens to a car when it is serviced by a technician.

 

Collaboration between objects means that one object sends messages to others, which in turn implies that an association relationship exists between sender and receiver objects. That is, they work together and rely on each other. 

 

For this part of your assignment, you are asked to identify and capture a set of classes on a UML class diagram in Visual Paradigm (derived from the objects shown on your sequence diagrams). For each class, identify the member functions. These will come from the messages, parameters and returned data that are sent to/from the object (see page 11 of lecture 24/25).

 

Secondly identify from the sequence diagrams, the relationships between these objects and also the multiplicities involved and capture those on your class diagram. Think about other potential object relationships such as ‘aggregation’, ‘composition’ and ‘kind-of/inheritance’ that might be present in your model (I’m not saying you have to use them or even if they are appropriate, but see if you can identify some where it makes sense, but only where it makes sense)

 

(20 marks)

 

Part D – Mapping to Code

 

Finally turn the class and sequence diagrams of Part C) above into a C++ application by writing some ‘harness’ code to create instances of the relevant classes and initialise at run-time the associations between those objects and thus simulate a user of the university system.

 

For each class function that implements a message on your sequence diagram it will be helpful if you can also include some form of print statement inside to display some suitable ‘text’ on the screen, so that at run-time it is easy to trace the execution of the program. Where it is required, get the function to be as realistic as possible (for example calculate an appropriate formula, or implement some suitable algorithm etc.) and return appropriate data back to the source of the message.

 

Use some creative latitude in translating the messages and concepts shown on your sequence diagrams into functions and code. Don’t use active objects or implement any form of concurrency into the solution unless you feel confident.

 

In Parts C/D/E your TAs will be looking for consistency between your models and the final executable code, that they feed into and reflect each other. The code for example should be reflected and identifiable on your class diagram and that messages on the sequence diagrams map to function calls in your code.

(20 marks
 

 

1.    For Part D of the assignment above pick on the major function that you would call to implement use case #2. Write a set of automated test cases (using your own test data) to check the correct operating of this. 

Use Assertions in your code to check for valid/invalid data and also to produce pass/fail criteria. Of course this assumes that the classes and subordinate functions of your major function also exist.                                                                           (10%)



2.    In addition, demonstrate your use of GitHub for maintaining version control of the software between you and your partner (if you didn’t have a partner for the assignment – create a second GitHub user and simulate having a partner – i.e. checking out some code, making changes and committing those changes.                                (10%)

 

More products