1 / 64

Software Design Models UML

Dive into the world of UML software design models, focusing on structural and behavioral elements, with an emphasis on use case diagrams. Learn how to create use cases that capture user requirements effectively and establish a contract between end users and developers. Gain insights into actors, associations, and generalizations within the diagram to provide a clear overview of system interactions. Explore various relationships and formal use case examples to enhance your understanding of system behavior modeling. Maximize your proficiency in UML diagrams with this comprehensive guide.

fgiron
Download Presentation

Software Design Models UML

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Software Design ModelsUML Software Engineering

  2. Structural : element of spec. irrespective of time Class Component Deployment Object Composite structure Package Behavioral : behavioral features of a system / business process Activity State machine Use case Interaction Overview of UML Diagrams • Interaction • : emphasize object interaction • Communication(collaberation) • Sequence • Interaction overview • Timing

  3. Activity Class Communication Component Component structure Deployment Interaction Object Package Sequence State machine Timing Use case 13 (!!) Kinds of UML Diagrams

  4. Use case model

  5. Use Case Diagram • Used for describing a set of user scenarios • Mainly used for capturing user requirements • Work like a contract between end user and software developers

  6. Use case modeling • Use cases were developed originally to support requirements elicitation and now incorporated into the UML. • Each use case represents a discrete task that involves external interaction with a system. • Actors in a use case may be people or other systems. • Represented diagramatically to provide an overview of the use case and in a more detailed textual form.

  7. Use cases diagram UML 2 Use cases diagrams describes the behavior of the target system from an external point of view. Use cases describe "the meat" of the actual requirements. • Use cases. A use case describes a sequence of actions that provide something of measurable value to an actor and is drawn as a horizontal ellipse. • Actors. An actor is a person, organization, or external system that plays a role in one or more interactions with your system. Actors are drawn as stick figures. • Associations. Associations between actors and use cases are indicated by solid lines. An association exists whenever an actor is involved with an interaction described by a use case.

  8. Use Case Diagram (core components) Actors:A role that a user plays with respect to the system,including human users and other systems. e.g.,inanimate physical objects (e.g. robot); an external system that needs some information from the current system. Use case:A set of scenarios that describing an interaction between a user and a system, including alternatives. System boundary: rectangle diagram representing the boundary between the actors and the system.

  9. Use Case Diagram(core relationship) Association: communication between an actor and a use case; Represented by a solid line. Generalization: relationship between one general use case and a special use case (used for defining special alternatives) Represented by a line with a triangular arrow head toward the parent use case.

  10. Billing System Register for Courses Registrar Student Use Case (Cont’d) Here we have a Student interacting with the Registrar and the Billing System via a “Register for Courses” use case.

  11. registration updating grades student faculty output generating Example of Use Case Diagram

  12. Use-Case Diagram A use case diagram is a collection of actors, use cases, and their communications.

  13. Use cases diagram

  14. Transfer-data use case • A use case in the MHC-PMS

  15. Example use case diagram

  16. Control System Scan Set limits Liason Physicist Take profile Experimental Physicist Calibrate Hardware Specialist Example use case diagram 2

  17. Order Food Customer Service Person Hire Employee Applicant <<uses>> Reorder supplies Manager Supplier <<uses>> Track sales and inv. data Produce mgt. reports Example use case diagram 3

  18. Example of Relationships

  19. Example of Relationships

  20. Example Use-case Diagram for a student database

  21. Tabular description of the ‘Transfer data’ use-case

  22. Formal use case example

  23. Example use case Use Case 12. Buy stocks over the web Primary Actor: Purchaser (user) Scope: PAF Level: user goal Precondition: User already has PAF open. Guarantees: sufficient log information exists that PAF can detect what went wrong. Success Guarantees: remote web site acknowledged purchase, user's portfolio updated. Main success scenario: 1. User selects to buy stocks over the web. 2. PAF gets name of web site to use (E*Trade, Schwabb, etc.) 3. PAF opens web connection to the site, retaining control. 4. User browses and buys stock from the web site. 5. PAF intercepts responses from the web site, and updates the user's portfolio. 6. PAF shows the user the new portfolio standing. Extensions: 2a. User wants a web site PAF does not support: 2a1. System gets new suggestion from user, with option to cancel use case. 3a. ...

  24. Use cases in the MHC-PMS involving the role ‘Medical Receptionist’

  25. Use case tables • formal use cases can also be written as a table:

  26. One method to do use cases Now that we know the syntax for doing use cases, what 4 steps does Cockburn recommend when actually brainstorming and writing our use cases? Let's look at each step in detail... • identify actors and their goals • write the main success scenario • identify and list possible failure extensions • describe how the system handles each failure

  27. Use cases diagram

  28. student Use Case Diagram - University System URS add member del member system user academic add subject del subject assg subject unass subject enrol subject unenrol subject

  29. Use Case Diagram for Student Assessment Management System Grade system Record grades Student View grades Teacher Distribute Report cards Create report cards Printing administrator

  30. Example: video store systemActor: Customer - What tasks does the actor want the system to perform? • Find movie to rent, rent tape, return tape, reserve tape • What information must the actor provide to the system? • Name, address, membership#, film name • Are there events that the actor must tell system about? • Change of address • Does actor need to be informed when something happens? • Reserved tape is ready to be rented • Does actor help initialize or shut down the system • no

  31. Example: video store system Resulting use cases: • Customer joins and provides contact information including name, address, phone#, credit information, spouse and kids • Customer browses system looking for a tape to rent • Customer comes to store looking for a specific tape to rent • Customer rents a tape • Customer returns a tape • Customer reserves a tape • Customer is contacted when a reserved tape is ready Note: simple phrases, without much details initially.

  32. Member Services Context Model Club Member Subscription Offer Club promotion Promotion order New Subscription Potential Member regular order Past Member Member credit status Subscription renewal offer Subscription renewal New Membership Plan & Sub. Offer A/C Receivable DB Order to be filled Sales and Promotion Reports Membership Reports New Monthly OR Seasonal Promotion Warehouse Marketing Dept. Member Services Dept.

  33. Sequence Diagrams

  34. Sequence diagrams • Sequence diagrams are part of the UML and are used to model the interactions between the actors and the objects within a system. • A sequence diagram shows the sequence of interactions that take place during a particular use case or use case instance. • The objects and actors involved are listed along the top of the diagram, with a dotted line drawn vertically from these. • Interactions between objects are indicated by annotated arrows.

  35. Sequence diagram for View patient information

  36. Sequence diagram for Transfer Data

  37. Classes and associations in the MHC-PMS

  38. A generalization hierarchy

  39. A generalization hierarchy with added detail

  40. Example for Sequence Diagram[Fowler] • We have an order and are going to invoke a command on it to calculate its price. To do that, the order needs to look at all the line items on the order and determine their prices, which are based on the pricing rules of the order line’s products. Having done that for all the line items, the order then needs to compute an overall discount, which is based on rules tied to the customer.

  41. Example for Sequence Diagram[Fowler] • We have an order and are going to invoke a command on it to calculate its price. To do that, the order needs to look at all the line items on the order and determine their prices, which are based on the pricing rules of the order line’s products. Having done that for all the line items, the order then needs to compute an overall discount, which is based on rules tied to the customer.

  42. Example Sequence Diagram aCustomer anOrderLine aProduct anOrder calculatePrice getQuantity Participant Lifeline getProduct Found message aProduct Activation Return getPricingDetails getBasePrice Self call Message calculateDiscounts getDiscountInfo

  43. Elements of Sequence Diagrams Name: Class Create New object Message Self-call Return Delete There is also notation for loops, conditions, etc.

  44. State machine models • These model the behaviour of the system in response to external and internal events. • They show the system’s responses to stimuli so are often used for modelling real-time systems. • State machine models show system states as nodes and events as arcs between these nodes. When an event occurs, the system moves from one state to another. • Statecharts are an integral part of the UML and are used to represent state machine models.

  45. State diagram of a microwave oven

  46. Weather system description A weather data collection system is required to generate weather maps on a regular basis using data collected from remote, unattended weather stations and other data sources such as weather observers, balloons and satellites. Weather stations transmit their data to the area computer in response to a request from that machine. The area computer validates the collected data and integrates it with the data from different sources. The integrated data is archived and, using data from this archive and a digitised map database a set of local weather maps is created. Maps may be printed for distribution on a special-purpose map printer or may be displayed in a number of different formats.

  47. Weather station description A weather station is a package of software controlled instruments which collects data, performs some data processing and transmits this data for further processing. The instruments include air and ground thermometers, an anemometer, a wind vane, a barometer and a rain gauge. Data is collected every five minutes. When a command is issued to transmit the weather data, the weather station processes and summarises the collected data. The summarised data is transmitted to the mapping computer when a request is received.

  48. Subsystems in the weather mapping system

  49. Use-cases for the weather station

More Related