UML Basic Behavioral Modeling Part I

Slides:



Advertisements
Similar presentations
Use-Cases.
Advertisements

Use Case Diagrams Damian Gordon.
CPSC 333: Foundations of Software EngineeringJ. Denzinger 2.2. Use Cases: Scenario based requirements modeling Recommended: Booch, Rumbaugh, Jacobson:
Use Case & Use Case Diagram
Use Case Modeling SJTU. Unified Modeling Language (UML) l Standardized notation for object-oriented development l Needs to be used with an analysis and.
Agenda What is a Use Case? Benefits of the Use Cases Use Cases vs. Requirements document Developing the Use Case model System Actor Use Case Use Case.
Information System Engineering
CS3773 Software Engineering Lecture 03 UML Use Cases.
OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 1/18 Use Case Analysis – continued Control Classes.
Interaction Diagrams Activity Diagram State Machine Diagram
Use Case Diagram © copyright 2001 SNU OOPSLA Lab..
Chapter 15: System Modeling with UML
Use-case Modeling.
© 2005 Prentice Hall4-1 Stumpf and Teague Object-Oriented Systems Analysis and Design with UML.
UML Sequence Diagrams Eileen Kraemer CSE 335 Michigan State University.
7. 2Object-Oriented Analysis and Design with the Unified Process Objectives  Detailed Object-Oriented Requirements Definitions  System Processes—A Use.
Use Case Modeling. Kendall & Kendall© 2005 Pearson Prentice Hall18-2 Commonly Used UML Diagrams The most commonly used UML diagrams are: – Use case diagram,
Unified Modeling Language 7/12/2015B.Ramamurthy1 The Unified Modeling Language™ (UML) was developed jointly by Grady Booch, Ivar Jacobson, and Jim Rumbaugh.
Use Case Analysis – continued
1 Lab Beginning Analysis and Design 4 Completion of first version of use case diagram initiates the processes of analysis and design. 4 UML provides.
Use Case Modeling. Use case diagram For each use case we develop  Object class diagram (with attributes only)  System sequence diagram (analysis) 
USE Case Model.
® IBM Software Group © 2006 IBM Corporation Writing Good Use Cases Module 4: Detailing a Use Case.
UML REVIEW –PART1 1. Introduction What is UML visual modelling language UML is a language not a methodology? Q: why is this distinction important? UML.
® IBM Software Group © 2006 IBM Corporation Rational Software France Object-Oriented Analysis and Design with UML2 and Rational Software Modeler 06. Requirements.
Software Engineering Design & Modelling
Requirements Artifacts Precursor to A & D. Objectives: Requirements Overview  Understand the basic Requirements concepts and how they affect Analysis.
USE CASE Bayu Adhi Tama, MTI Faculty of Computer Science, University of Sriwijaya Slides are adapted from Petrus Mursanto
Requirements Analysis Visual Modeling] Lab 02 Visual Modeling (from Visual Modeling with Rational Rose and UML) A way of thinking about problems using.
Requirements as Usecases Capturing the REQUIREMENT ANALYSIS DESIGN IMPLEMENTATION TEST.
Unified Modeling Language* Keng Siau University of Nebraska-Lincoln *Adapted from “Software Architecture and the UML” by Grady Booch.
1 Objectives  Define key concepts of use-case modeling.  List the benefits of use-case modeling.  Find actors and use cases.  Describe their relationships.
A Use Case Primer 1. The Benefits of Use Cases  Compared to traditional methods, use cases are easy to write and to read.  Use cases force the developers.
Faculty of Applied Engineering and Urban Planning Software Engineering Department Software Engineering Lab Use Cases Faculty of Information system Technology.
1 Use Case Diagrams Use Case Actor Use case description Use case realization (Scenario) Use case relationships –Extends –Uses.
Discovering object interaction. Use case realisation The USE CASE diagram presents an outside view of the system. The functionality of the use case is.
Use Cases Use Cases are employed to describe the functionality or behavior of a system. Each use case describes a different capability that the system.
Use Case Diagram The purpose is to communicate the system’s functionality and behaviour to the customer or end user. Mainly used for capturing user requirements.
1 The Unified Modeling Language. 2 The Unified Modeling Language (UML) is a standard language for writing software blueprints. The UML may be used to.
Business Analysis with For PG MDI, Gurgaon Kamna Malik, Ph.D.
UML as a Specification Language for Embedded Systems. By, Mir Ahmed Ali, Asst. Professor, ECM department, SNIST. By, Prof. Narsiah sir, Director of School.
Unified Modeling Language User Guide Section 4 - Basic Behavioral Modeling Chapter 16 - Use Cases Chapter 17 - Use Case Diagrams.
Introduction to UML CS A470. What is UML? Unified Modeling Language –OMG Standard, Object Management Group –Based on work from Booch, Rumbaugh, Jacobson.
CS212: Object Oriented Analysis and Design Lecture 32: Use case and Class diagrams.
Scenario A scenario is a sequence of steps describing an interaction between a user and a system. Use case is a set of scenarios tied together by a common.
UML Overview 1. 2 UNIFIED Modeling Language  OMG adopted UML in November 1997 as the standard for object-oriented modeling  Combines commonly accepted.
Sept Ron McFadyen1 Use Cases Introduced by Ivar Jacobson in 1986 literal translation from Swedish ”usage case” Used to capture and describe.
22 August, 2007Information System Design IT60105, Autumn 2007 Information System Design IT60105 Lecture 8 Use Case Diagrams.
UML (Unified Modeling Language)
UML - Development Process 1 Software Development Process Using UML.
 What to do if you want to build a new house? › Buy a bunch of wood and nails and start immediately. › Or, put some blueprints to follow, and plan of.
Chapter 6: Structuring Requirements: Use Case Description and Diagrams Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
Use Case Diagrams. Introduction In the previous Lecture, you saw a brief review of the nine UML diagrams. Now that you have the clear, you'll start to.
Chapter 3: Software Design –Use case Diagram Nouf Alghanmi.
UC Diagram & Scenario RKPL C & D. Using Use Case Diagram Use case diagrams are used to visualize, specify, construct, and document the (intended) behavior.
1 Advanced DataBases Unified Modelling Language An Introduction and Use Case Lecture 2 Susan Curtis.
Use Case Diagrams A Detailed Description. Use Case Diagrams Use case diagrams describe relationships between users and use cases A use case is a (usually.
1 Case Study and Use Cases for Case Study Lecture # 28.
Using Use Case Diagrams
Use Case Modeling - II Lecture # 27.
Course Outcomes of Object Oriented Modeling Design (17630,C604)
Introduction to Unified Modeling Language (UML)
Use Case Model Use case diagram.
UML Use Case Diagrams.
Start at 17th March 2012 end at 31th March 2012
The Unified Modeling Language
SAD ::: Spring 2018 Sabbir Muhammad Saleh
Object Oriented Analysis and Design
Using Use Case Diagrams
Software Development Process Using UML Recap
Presentation transcript:

UML Basic Behavioral Modeling Part I

UML Bird’s Eye View Building Blocks: Things: abstractions, main concepts in a model Relationships: tie the things together Diagrams: group interesting collections of things

Things in the UML Structural Things (7) static part of a model, conceptual or physical elements nouns of UML Models Behavioral Things (2) dynamic parts of models verb, representing behavior over time and space Grouping Things (1) Organizational parts of models, decomposition element Annotational Things (1) explanatory parts of models, comments about other elements

Relationships in the UML Dependency semantic relationship, a change in one element may affect the other element Association structural relationship that describes a set of links among objects Generalization/Specialization relationship in which objects of the specialized element (child) are substitutable for objects of the generalized element (parent) Realization semantic relationship between classifiers (class realizes an interface or collaboration realizes a use case)

Diagrams in the UML Class diagram Object diagram Use case diagram Sequence diagram Collaboration diagram Statechart diagram Activity diagram Component diagram Deployment diagram

Rules of the UML UML defines Rules for Names Scope Visibility Integrity Execution

Common Mehanism in the UML Specifications Adornments Common Division Extensibility Mechanisms

Behavioral Modeling Use Cases / Use Cases Diagrams Interactions / Interaction Diagrams State Diagrams Activity Diagrams

Use Cases Description of a set of sequences of actions, that a system performs to yield an observable result to an end-user Categories of interactions between the system to be built and external actors Identify high-level services provided by the system Specify the behavior of a system Popularized by Ivar Jacobson with Objectory Have been adopted by or have influenced many methods (eg. OMT, Fusion, Booch)

Use Cases (cont.) Can be applied to whole system as well as part of system such as a subsystem or a class Sources of integration tests and system tests May have variants: specialized use cases or extension of use cases. Do not specify any implementation detail Main communication tool with end-user Each use case must have a name (simple or path name)

Actors Objects outside the system which play a particular role Represent the user(s) of the system Interact with the system through use cases May participate in more than one use case May or may not be represented as a class or object in the object model Also known as agents (Jacobson)

UML Use Case Graphical Representation Storage depot system Delivery Collection Clerk Status Storage Use case Actor Manager

Why Modeling Use Cases Use Case model describes WHAT the system will do at a high-level User focus Capture requirements from user's perspective. Users are involved. Goal is to scope the project and give the application some structure Use Cases are the unit of estimation Uses Cases are smallest unit of delivery One way of estimating the percentage of requirements captured. Prioritizing use cases for "phased delivery" according to user's immediate needs. Better way of estimating the percentage of requirements completed during development

Benefits of use cases Good way to start identifying objects from scenarios. Test plan can be immediately generated based on use cases. Easier user validation. Helps technical writers in structuring the overall work on the users manuals at an early stage. Better traceability throughout the system development process. Quality of the software is improved by identifying the exception scenarios earlier in the development process.

Problems with use cases What is the right granularity What is a correct Use Case Explosion of different scenarios Focus on functions, with potential for functional decomposition Too often too informal

Use Cases and Scenarios Scenario is a specific sequence of actions Scenario is one instance of a Use Case Typically many scenarios correspond to one Use Case Example: Use Case = Hire Employee Scenarios Hire at Job Fair Hire through newspaper ad Hire from internal promotion Hire Temp

Use Cases and Collaborations Use Case captures WHAT the system does Use Cases do not specifies HOW the System does it Development effort is aimed at implementing the use cases by creating a society of classes working together These interacting classes are modeled using Collaborations A Collaboration is the realization of a Use Case A Collaboration represents how responsibilities are distributed across objects A Collaboration has a Static and a Dynamic aspect

Organizing Use Cases Relationships: Generalization, Include (Use) and Extend Generalization: Like for Classes Include: Use: Contains another complete use-case Extend: Extends another use-case used for optional separate flow (exception) Beware: Over-use of extends = functional decomposition Rumbaugh says Use = aggregation and Extend = inheritance

Hints and Tips Each Use Case should represent a single, identifiable and reasonably atomic part of the behavior of the system Factors Common Behavior by pulling such behavior from other use cases that it includes Factors variants by pushing such behavior into other use cases that extend it Describe flow of vents clearly enough for anyone to easily understand it Each Use Case is described by a number of scenarios that specify the normal and variants

Use Case Diagrams system is represented by a large rectangle uses cases are represented as ellipses within the system rectangle actors are represented as stick figure outside the system an arrow connects the initiating actor to the use case (ending at the use case) other participating actors are joined by arrows terminating at the actor

Banking System Use Case Diagram open_account Cash Dispenser withdraw_cash Customer Clerk clear_checks loan_application Manager get_report Loan Officer

Use Case Identification Steps Determine the boundary of the system consider system as a single “black box” object Identify who is going to be using the system directly - e.g. hitting keys on the keyboard. These are the Actors start by considering physical object an individual object may play several roles Choose One of these Actors and determine the fundamental ways in which each actor uses the system each of these is a use case must be enumerable for each of those Use Cases decide on the most usual course when that Actor is using the system. What normally happens. This is the basic course

Use Case Identification Steps (2) Describe it as "Actor does something, system does something. Actor does something, system does something." but keep it at a high level. do not mention any GUI specifics only describe things that the system does that the actor would be aware of and conversely you only describe what the actor does that the system would be aware of. do not worry about the alternate paths (extends) or common courses (uses) - Yet - Review each Use Case descriptions against the descriptions of the other Use Cases. Once basic course is OK, consider the alternates and add those as extending use cases.

Use Case Identification Steps (3) Good way of getting started with Use Case modelling. Once started and comfortable with this process, next step: understand the trade-offs that can be made simplicity versus "completeness" putting too much in is the most common mistake.

Use Case Textual Descriptions OPEN_ACCOUNT a clerk requests the system to create a new account WITHDRAW_CASH a customer requests the system to withdraw a specified amount of money from a specified account CLEAR_CHECKS a clerk instructs the system to update all accounts according to specified transactions including checks LOAN_APPLICATION a customer files a loan application GET_REPORT a manager or loan officer requests a report of the days transactions from the system

Use Cases Diagram Hint and Tips Put all the Use Cases that describe one aspect of the system together Contains only those use cases and actors essential to understanding that aspect Diagram should be named to communicate its purpose Minimize crossing lines Don’t draw too many use cases or too many relationships in one diagram

Modeling Exercices: Develop the Use Cases for a Telephone Catalog System Develop the Use Cases for a Point Of Sales System grocery store requires a computer system to control the checkout points at which customers pay for the items they have selected. Using the bar code the checkout controller determine the price, name, number in stocks, sell-by-date (if applicable) Develop the Use Cases for a Access Control System System maintains the security and access t a number of doors inside or into a building. Doors are linked to keypads and card reader. All doors are connected to a central controlling unit Develop the Use Cases for a Course Scheduling System

Modeling Exercices: Develop the Use Cases for a Library System supports library library lends books and magazines to borrowers who are registered in the system, as are books and magazines library buys new titles, eventually in multiple copies old books and magazines are removed when out of date. borrower can reserve a book or magazine not currently available

Detail Use Cases Start with a short, step-by-step description of the use-case flow of events, and gradually make it more detailed. Describe how the use case start and what is the signal that activates the use case. Describe how the use case terminate Describe what will reside inside the system, and what will reside outside the system. Describe the interaction between use case and actors. Describe how the use case exchange data with an actor.

Use Case Details Name The name of the use case. Brief Description A brief description of the role and purpose of the use case. Flow of Events A textual description of what the system does in regard to the use case. Understandable by the customer. Include the main flow of events as well as the alternate flow of events Special Requirements A textual description that collects all requirements, such as non-functional requirements, on the use case, that are not considered in the use-case model, but that need to be taken care of during design or implementation.

Use Case Details Preconditions A textual description that defines the state of the system prior to the use case may being performed. Postconditions A textual description that defines a list of possible states the system can be in immediately after a use case has finished. Extension points A list of locations within the flow of events of the use case at which additional behavior can be inserted using the extend-relationship. Relationships The relationships, such as communicates-associations, include-, generalization-, and extend-relationships, in which the use case participates.

Use Case Details - Example Name : Register for Courses Description: This use case is started by the actor student. It provides the capability for the student to manage his registration to a course for a semester, and to have the billing information sent to the Billing Office. Main Flow of Events: The student enters his Id. The system verifies the student Id, and prompt the student to select the current or a future semester. The student selects the semester. The system prompts the student to select the desired activity (create a registration, review a registration, change a registration). Once completed the student indicates that the activity is completed. The system acknowledge and displays the result of the activity. The system sends the billing information to the billing system for processing.

Use Case Details – Example (cont.) Alternative Flow of Events: 1- If an invalid Id is entered, the system will not allow access to the registration system and displays an error message to the student. Special Requirements: The student should be able to access the system through the web. It should take less than 30 seconds to display the web page. A student can register to a maximum of 5 courses per semester. Pre-Conditions: The system is operational. Post-Conditions: The student information has been updated. His bill is sent. Extension Points: None Relationships: