Presentation is loading. Please wait.

Presentation is loading. Please wait.

Systems Analysis and Design I

Similar presentations


Presentation on theme: "Systems Analysis and Design I"— Presentation transcript:

1 Systems Analysis and Design I
Revision Class May 20th 2019

2 Contents Level 4, 15 credits Module code: COIY016H4
Lecture Date Lab Remark W1 Introduction, IS development Object-orientation fundamentals Jan 14 None W2 Jan 21 W3 Modelling concepts, activity diagram Jan 28 W4 Requirements, use cases Feb 4 W5 Class diagrams+Project Tutorial Feb 11 Test 1 W6 Sequence diagrams Feb 18 Group Project 1 W7 State diagrams 1+Project Tutorial Feb 25 Group Project 2 W8 State diagrams 2+Project Tutorial Mar 4 Group Project 3 W9 Mar 11 Group Project 4 Test 2 W10 System design+Project Tutorial Mar 18 Group Project 5 Make-up Test 1 W11 Version control+Project Tutorial Mar 25 Group Project 6 Make-up Test 2 Level 4, 15 credits Module code: COIY016H4 All material is available:

3 Assessment Coursework (20%) Examination (80%)
2 In-Class Tests (5% each) 25 Multiple-Choice Questions (in 25 mins) Test 1 (on Week 5, Feb 11) Test 2 (on Week 9, Mar 11) Both questions and answers have been uploaded to Moodle 1 Group Project (10%) 50 Marks Evaluation Quality of your report: 25 marks. Feedback from your peers: 25 marks. Examination (80%) 3

4 Examination 2-hour exam, FOUR questions, 100 marks
Past papers is available [under “information systems concepts”] Two different types of questions: Short-answer questions (Small) case studies with UML modelling

5 Examples What are the advantages of the traditional waterfall lifecycle (TLC)? (5 marks) Answer: Tasks in phases may be assigned to specialised teams. (1 mark) Project progress is evaluated at the end of each phase. (2 marks) TCL can be used to manage projects with high levels of risks. (2 marks) You will see FIVE short-answer questions in the exam, each of them is worth 5 marks Suggestion: look at the past papers, go through all of those questions and try to answer them Read the slides and textbook please!

6 UML Modelling UML2 defines 14 types of diagrams Structure Behaviour
Class Diagram, Object Diagram Component Diagram, Package Diagram, Profile Diagram Composite Structure Diagram, Deployment Diagram Behaviour Use Case Diagram Activity Diagram, State Machine Diagram Interaction Sequence Diagram, Communication Diagram Timing Diagram, Interaction Overview Diagram 6 6

7 Activity diagrams Used to model high-level business tasks and system functions action node rectangle with rounded corners and a meaningful name action edge (control flow) open arrow Add a New Client Action exists to carry out some task. Action exists to carry out some task. The flow implies that as soon as the first action is complete, the next action is started. Assign Staff Contact The flow implies that as soon as the first action is complete, the next action is started. 7 7

8 Notation of Activity Diagrams
initial node black circle decision node merge node diamond guard condition in square brackets final node black circle in white circle [campaign to add] [no campaign to add] Add a New Client Assign Staff Contact Add New Campaign The flow of control will follow along the first control flow with a guard condition that evaluates to true. 8 8

9 Tips on Activity Diagrams
[no staff to assign] Add a New Client Assign Staff Contact Add New Campaign [campaign to add] [no campaign to add] Assign Staff to Campaign [staff to assign] Iteration or loop can be represented Multiple flows from an action are implicitly AND-ed Guard conditions do not have to be mutually exclusive, but it is advisable that they should be If they are not, you need to specify the order of evaluation (otherwise the results will be unpredictable) Decisions should be strictly nested, but a merge point can be combined with the following decision point 9 9

10 Notation of Activity Diagrams
fork node join node thick bar actions carried out in parallel Add a New Client Assign Staff Contact Add New Campaign 10 10

11 Self-Check of activity diagrams
Action Nodes action node, decision node, initial node, final node, merge node, fork node, join node Edges: action edge, guard conditions OO related: class name, operation name, object flow, activity partition Interrupting edge is activity edge expressing interruption for regions having interruptions. It is rendered as a lightning-bolt 11 11

12 Use case diagram Use Cases – descriptions of the functionality of the system from the users’ perspective. Use Case diagrams show which users will communicate with the system define the scope of the system Use Case descriptions specify the interaction between the users (actors) and the system for each use case as the users see it could be further elaborated by communication/sequence diagrams.

13 System or subsystem boundary
Use Case Diagram Four aspects: actors use cases Communication association system/subsystem boundary System or subsystem boundary Actor Use case Communication association Staff Contact Change a client contact 13 13

14 Extend and Include relationships
Use Case Diagrams: Extend and Include relationships The extend and include relationships between Use Cases shown as stereotyped dependencies [a stereotype is a special use of a model element that is constrained to behave in a particular way] Stereotype are shown by using a keywork in match guillemets «extend» and «include» (text strings in guillemets) Warning: easy to confuse extend and include! Dependencies Extend and Include relationships between use cases shown as stereotyped dependencies stereotypes are written as text strings in guillemets: «extend» and «include» 14 14

15 Use Case Diagrams: «extend»
Extend means: One use case provides additional functionality that may be required in another use case “does something over and above what is done” There may be multiple ways of extending a use case represent variations in the way that actors interact with the use case Rather than capturing all variations in one use case, document the core functionality in one and then extend it with other The extension points show when the extension occurs A condition can be placed in a note joined to the dependency arrow 15 15

16 Use Case Diagrams: «extend»
Campaign Manager Check campaign budget summary «extend» Print campaign Summary print extension points Condition {print option selected} extension point: Summary print Note: is not put in square brackets, unlike conditions in other diagrams.) Fig. 6.7 16 16

17 Use Case Diagrams: «include»
When there is a sequence of behaviour that is used frequently in a number of use cases Want to avoid copying the same description everywhere separate out the sequence of behaviour that is used in many use cases One use case includes the functionality of another use case A use case may include more than one other Do not overuse: Should not be used to create a hierarchical functional decomposition of the system 17 17

18 Assign staff to work on a campaign
Use Case Diagrams: «include» Campaign Manager «include» Find campaign Assign staff to work on a campaign Fig 6.8 18 18

19 Note: you do NOT need to show all the details of the extension points

20 Use Case Diagrams: Generalisation
Between use cases: there may be similar use cases with common functionality best represented by generalising out that functionality in to a “super-use-case” shows that one use case provides all the functionality of the more generalised use case and some additional functionality Between actors: shows that one actor can participate in all the associations with use cases the more specific actor can plus some additional use cases 20 20

21 Use Case Diagrams: Generalisation
Record completion of an advert Staff Contact Change a client contact Fig. 6.10 Super use case Assign individual staff to work on a campaign Assign staff to work on a campaign Assign team of staff to work on a campaign Campaign Manager 21 21

22 Use Case Descriptions Using a step-by-step breakdown of interaction between actor and system Assign staff to work on a campaign Actor Action System Response 1. The actor enters the client name. 2. Lists all campaigns for that client. 3. Selects the relevant campaign Displays a list of all staff members not already allocated to this campaign. 5. Highlights the staff members 6.Presents a message confirming to be assigned to this campaign. that staff have been allocated. Alternative Courses Steps 1–3. The actor knows the campaign name and enters it directly. scenario Referred to as scenario 22 22

23 Class diagrams class name compartment attributes compartment
Class (and Object/Instance) Stereotypes Attributes (and State) Associations (and Links) Multiplicity Operations Client companyAddress company companyFax companyName companyTelephone class name compartment attributes compartment Only staff members in the role of staff contact can participate in this association operations compartment 23

24 direction in which name should be read (optional)
association association role Client StaffMember companyAddress staffContact staffName company staffNo liaises with companyFax staffStartDate companyName Only staff members in the role of staff contact can participate in this association companyTelephone association name direction in which name should be read (optional) Only staff members in the role of staffContact can participate in this association 24 24

25 Association End association role
Professor "playing the role" of author is associated with textbook end typed as Book. The idea of the role is that the same class can play the same or different roles in other associations. For example, Professor could be an author of some Books or an editor.

26 Multiplicity The multiplicity of an association is the range of permitted cardinalities of its participating objects (i.e., #objects that can participate in the association) Decided by business rules. for example: any bank customer may have one or more accounts every individual account is for one, and only one, customer n: exactly n *: any number m..n: any number in the range m to n (inclusive) 0..1: optional (i.e., either none or 1) 1..*: at least one 26 26

27 Aggregation and Composition
Two special types of association Aggregation represents a whole-part relationship between classes Composition (or Composition aggregation) is based on the concept of aggregation Composition expresses a similar relationship but differs in showing a stronger form of ownership by the whole Each part may belong to only one whole at a time. When the whole is destroyed, so are all its parts. 27 27

28 Composition vs aggregation
In both aggregation and composition object of one class "owns" object of another class. But there is a subtle difference. In Composition the object of class that is owned by the object of it's owning class cannot live on it's own Also called "death relationship". It will always live as a part of it's owning object In Aggregation the dependent object is standalone and can exist even if the object of the owning class is dead. So in composition if owning object is garbage collected the owned object will also be which is not the case in aggregation. Confused? Composition Example : Consider example of a Car and an engine that is very specific to that car (meaning it cannot be used in any other car). This type of relation ship between Car and SpecificEngine class is called Composition. Object of Car class cannot exist without object of SpecificEngine class and object of SpecificEngine has no significance without Car class. To put in simple words Car class solely "owns" the SpecificEngine class. Aggregation Example : Now consider class Car and class Wheel. Car needs a Wheel object to function. Meaning Car object own Wheel object but we cannot say Wheel object has no significance without Car Object. It can very well be used in a Bike, Truck or different Cars Object. Aggregation and Composition are subsets of association meaning they are specific cases of association.

29 unfilled diamond denotes aggregation
Notation: Aggregation A student could be in a number of modules If a module is cancelled, students are not destroyed Module Student 0..* 1..* unfilled diamond denotes aggregation “Owing” class 29 29

30 filled diamond denotes composition
Notation: Composition An ingredient is in only one meal at a time If you drop your meal on the floor, you probably lose the ingredients too Meal Ingredient 1..* 1 filled diamond denotes composition “Owing” class 30 30

31 Small trick Trick to remember the difference : has A -- Aggregation
Own -- cOmposition So in composition if owning object is garbage collected the owned object will also be which is not the case in aggregation. Confused? Composition Example : Consider example of a Car and an engine that is very specific to that car (meaning it cannot be used in any other car). This type of relation ship between Car and SpecificEngine class is called Composition. Object of Car class cannot exist without object of SpecificEngine class and object of SpecificEngine has no significance without Car class. To put in simple words Car class solely "owns" the SpecificEngine class. Aggregation Example : Now consider class Car and class Wheel. Car needs a Wheel object to function. Meaning Car object own Wheel object but we cannot say Wheel object has no significance without Car Object. It can very well be used in a Bike, Truck or different Cars Object.

32 Adding Generalization Structure
Figure 8.2 32 32

33 Class Diagrams Checklist
Requirements Model → Analysis Model → Design Model To Draw a class diagram Identify Classes Determine Stereotypes Find and Locate Attributes Add Associations Determine Multiplicity Find and Locate Operations Class (and Object/Instance) Stereotypes Attributes (and State) Associations (and Links) Multiplicity Operations 33 33

34 Sequence diagram Frame label Sequence diagram is enclosed in a frame
:Client :Campaign :Advert getName listCampaigns listAdverts Advert newAd:Advert addNewAdvert Lifeline Activation or Execution Object creation :CampaignManager sd Add a new advert to a campaign loop Interaction Operator Interaction Constraint Combined Fragment (loop) [For all client’s campaigns] getCampaignDetails [For all campaign’s adverts] getAdvertDetails Frame label Sequence diagram is enclosed in a frame “sd” is used to determine the interaction diagram; interaction

35 Sequence Diagrams: Example
Figure 9.4 on p. 265 :LifelineA :LifelineB Synchronous (blocking) message sd Interaction Name msg a Send message Event Occurrence (msg.sendEvent) Receive messaged Event Occurrence (msg.recieveEvent) start of Execution Occurrence end of Active State on lifeline showing pre-condition Message reply showing return of control 36 36

36 Figure 9.16 on p. 275 alt interaction operator shows branching
:Client :Campaign :Advert getName listCampaigns ref :CampaignManager Advert addCostedAdvert newAd:Advert newRequest:Request alt [else] sd Add a new advert to a campaign if within budget List client campaigns [totalCost <= budget] Request Get campaign budget alt interaction operator shows branching Two interaction operands, one for each alternative Figure on p. 275 38 38

37 Example Suppose you are developing an online university enrollment system. Create a use case diagram for the following requirements. (a) The system should enable the academic staff to examine the modules offered by their department, add and remove modules, and change the information about them (e.g., the maximum number of students permitted). (6 marks) (b) It should permit students to examine currently available modules, add and drop modules from their schedules and examine the modules for which they are enrolled. (6 marks) (c) Department staff (i.e., academic and administrative staff) should be able to print a variety of reports about the modules and the students enrolled in them. (7 marks) (d) The system should ensure that no student takes too many modules and that students who have any unpaid fees are not permitted to register. (6 marks)

38 Answer (a) The system should enable the academic staff to examine the modules offered by their department, add and remove modules, and change the information about them (e.g., the maximum number of students permitted). (b) It should permit students to examine currently available modules, add and drop modules from their schedules and examine the modules for which they are enrolled. (c) Department staff (i.e., academic and administrative staff) should be able to print a variety of reports about the modules and the students enrolled in them. (d) The system should ensure that no student takes too many modules and that students who have any unpaid fees are not permitted to register.

39 Example Suppose you are developing a point-of-sale system that manages the checkout process in a supermarket. Create a class diagram for the following requirements. (a) Each transaction includes at least one item. Date and time of each transaction must be recorded. (4 marks) (b) Items can be coded or weighted. Coded items have code. Weighted items have price per kg and weight. All items have a method of calculating their price. (6 marks) (c) Some customers have loyalty cards. Only one loyalty card may be used in a transaction.(4 marks) (d) No transaction can be completed without a payment and each payment is made for a single transaction. (5 marks) (e) A payment can be made in cash or by debit/credit card. Cash payments record the amount given and change. Card payments record card number and bank authorization code.(6 marks)

40 Answer

41 In the exam You will encounter THREE such questions in the exam
Each one asks you to develop one UML diagram which might be Activity diagram, class diagram, sequence diagram, use case diagram Each question is worth 25 marks. Suggestion: look at the past papers, go through all of those questions and try to come up with UML diagram by yourself

42 Good luck!


Download ppt "Systems Analysis and Design I"

Similar presentations


Ads by Google