/
Systems Analysis and Design I Systems Analysis and Design I

Systems Analysis and Design I - PowerPoint Presentation

celsa-spraggs
celsa-spraggs . @celsa-spraggs
Follow
344 views
Uploaded On 2019-11-19

Systems Analysis and Design I - PPT Presentation

Systems Analysis and Design I Revision Class May 20 th 2019 Contents Level 4 15 credits Module code COIY016H4 All material is available httpwwwdcsbbkacuktaolueSADISADIhtm Lecture Date ID: 765457

case diagram staff campaign diagram case campaign staff diagrams class add marks interaction modules system object client node advert

Share:

Link:

Embed:

Download Presentation from below link

Download Presentation The PPT/PDF document "Systems Analysis and Design I" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

Systems Analysis and Design I Revision Class May 20 th 2019

Contents Level 4, 15 credits Module code: COIY016H4All material is available: http://www.dcs.bbk.ac.uk/~taolue/SADI/SADI.htm 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 None 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

Assessment Coursework (20%) 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%)

Examination 2-hour exam , FOUR questions, 100 marksPast papers is available http://www.bbk.ac.uk/library/exam-papers/computer-science [under “information systems concepts”]Two different types of questions:Short-answer questions(Small) case studies with UML modelling

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 marksSuggestion: look at the past papers, go through all of those questions and try to answer themRead the slides and textbook please!

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

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

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

9 Tips on Activity Diagrams 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 [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]

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

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

Use case diagram Use Cases – descriptions of the functionality of the system from the users’ perspective.Use Case diagramsshow which users will communicate with the systemdefine the scope of the systemUse Case descriptionsspecify the interaction between the users (actors) and the system for each use case as the users see itcould be further elaborated by communication/sequence diagrams.

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

14 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!

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

16 Use Case Diagrams: «extend» Campaign Manager Check c ampaign b udget s ummary «extend» Print c ampaign Summary print e xtension points Condition {print option selected} extension point: Summary print Note: is not put in square brackets, unlike conditions in other diagrams.)

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

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

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

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

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. 4. 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. Referred to as scenario

Class diagrams Client companyAddress companyEmail companyFax companyName companyTelephone class name compartment attributes compartment operations compartment Class (and Object/Instance) Stereotypes Attributes (and State) Associations (and Links) Multiplicity Operations

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

Professor  "playing the role" of  author  is associated with  textbook end typed as Book. association role Association End 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 m ultiplicity 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 accountsevery individual account is for one, and only one, customern: 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

27 Aggregation and Composition Two s pecial 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.

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.

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

30 Meal Ingredient 1.. * 1 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 “ Owing” class

Small trick Trick to remember the difference : has A -- A ggregation Own -- c O mposition

32 Adding Generali z ation Structure

33 Class Diagrams Checklist Class (and Object/Instance) Stereotypes Attributes (and State) Associations (and Links) Multiplicity Operations 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

34 Requirement Analysis with UML Requirements Model → Analysis Model → Design Model To Draw an Analysis Class Diagram Identify Classes Determine Stereotypes (particular classes that will occur again and again) Find and Locate Attributes Add Associations Determine Multiplicity Find and Locate Operations

35 Sequence diagram :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 loop Interaction Operator Interaction Constraint Combined Fragment (loop) [For all client’s campaigns] getCampaignDetails [For all campaign’s adverts] getAdvertDetails Sequence diagram is enclosed in a frame Frame label

36 :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 Execution Occurrence Execution Occurrence Active State on lifeline showing pre-condition Message reply showing return of control Figure 9.4 on p. 265 Sequence Diagrams: Example

37 Sequence Diagrams: Flow Control Sequencing is shown by arranging messages vertically in the order of their occurrences Recall: the vertical dimension represents time. Selection (branching) is shown by a combined fragment rectangle with the interaction operator ‘ alt’ (a short form of alternatives) The alt combined fragment has two (or more) compartments known as operands. Each operand corresponds to one of the alternatives in the combined fragment and should have an interaction constraint to indicate under what conditions it executes. Iteration (looping) is shown by a combined fragment rectangle with the interaction operator ‘ loop ’ The interaction in the loop combined fragment repeats as long as the guard condition in the interaction constraint evaluates as true.

38 :Client :Campaign :Advert getName listCampaigns ref 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 9.16 on p. 275

39 :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 loop Interaction Operator Interaction Constraint Combined Fragment (loop) [For all client’s campaigns] getCampaignDetails [For all campaign’s adverts] getAdvertDetails A sequence diagram is enclosed in a frame Frame label Figure 9.3 on p. 263

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)

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.

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)

Answer

In the exam You will encounter THREE such questions in the examEach one asks you to develop one UML diagram which might beActivity diagram, class diagram, sequence diagram, use case diagramEach 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

Good luck!