OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  1998-1999 Rational Software, all rights reserved 1/29 Object Oriented Analysis and Design Using.

Slides:



Advertisements
Similar presentations
OOAD – Dr. A. Alghamdi Mastering Object-Oriented Analysis and Design with UML Module 3: Requirements Overview Module 3 - Requirements Overview.
Advertisements

Introduction to Rational Rose 2000 v6.5 Copyright © 1999 Rational Software, all rights reserved 1 Rational Rose 2000 Interaction Diagrams.
1 Generalizations Multiple Inheritance (finishing up Class Design) Class Design – Another Look – Part 11.
Chapter 22 Object-Oriented Systems Analysis and Design and UML Systems Analysis and Design Kendall and Kendall Fifth Edition.
Practical Business Modeling in the Unified Process Tom Morgan Software Architect, Fidelity National Information Services
OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 1/18 Use Case Analysis – continued Control Classes.
Use Case Diagram © copyright 2001 SNU OOPSLA Lab..
Object-Oriented Analysis and Design
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 5: Restaurant.
The Unified Software Development Process - Workflows Ivar Jacobson, Grady Booch, James Rumbaugh Addison Wesley, 1999.
SE 555 Software Requirements & Specification1 Use-Case Modeling: Overview and Context.
Uml and Use Cases CS 414, Software Engineering I Mark Ardis Rose-Hulman Institute January 9, 2003.
Finding Analysis Classes Written by Zvika Gutterman Adam Carmi.
CREATING THE DESIGN: THE LOGICAL VIEW The Class Diagram.
OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 1 Object Oriented Analysis and Design Using.
Finding Analysis Classes Written by Zvika Gutterman Adam Carmi.
Requirements Analysis 2 What objects collaborate to achieve the goal of a use case?
© Copyright Eliyahu Brutman Programming Techniques Course.
Use Case Analysis – continued
SE 555 Software Requirements & Specification Requirements Analysis.
Object Oriented Analysis and Design Using the UML
PRJ566: PROJECT PLANNING AND MANAGEMENT Class Diagrams.
Object-Oriented Analysis and Design
The chapter will address the following questions:
OOAD – Dr. A. Alghamdi Mastering Object-Oriented Analysis and Design with UML Module 6: Use-Case Analysis Module 6 - Use-Case Analysis.
Object Oriented Analysis and Design Using the UML
Why Analysis Process Refer to earlier chapters Models what the system will do makes it easier for understanding no environment considered (hence, system.
® IBM Software Group © 2006 IBM Corporation Rational Software France Object-Oriented Analysis and Design with UML2 and Rational Software Modeler 06. Requirements.
Prepared by: Sanaz Helmi Hoda Akbari Zahra Ahmadi Sharif University of Tech. Summer 2006 An Introduction to.
SWE © Solomon Seifu ELABORATION. SWE © Solomon Seifu Lesson 7 Use Case Analysis.
10/12/ Recall The Team Skills 1. Analyzing the Problem (with 5 steps) 2. Understanding User and Stakeholder Needs 1. Interviews & questionnaires.
Software Engineering Chapter 7 Fall Capturing the Requirements as Use Cases Capturing the Requirements as Use Cases By using use cases analysts.
Copyright 2002 Prentice-Hall, Inc. Chapter 2 Object-Oriented Analysis and Design Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey.
Slide 1 Structural Modeling Chapter 7. Slide 2 Key Ideas A structural or conceptual model describes the structure of the data that supports the business.
Approaching a Problem Where do we start? How do we proceed?
Lecture 3 Uses Cases Topics UML Use Cases pop quiz Readings: Chapter 3 January 24, 2008 CSCE 492 Software Engineering.
Systems Analysis and Design in a Changing World, 3rd Edition
CS3773 Software Engineering Lecture 04 UML Class Diagram.
Requirements as Usecases Capturing the REQUIREMENT ANALYSIS DESIGN IMPLEMENTATION TEST.
Chapter 10 Analysis and Design Discipline. 2 Purpose The purpose is to translate the requirements into a specification that describes how to implement.
Notes of Rational Related cyt. 2 Outline 3 Capturing business requirements using use cases Practical principles  Find the right boundaries for your.
Introduction to Rational Rose 2000 v6.5 Copyright © 1999 Rational Software, all rights reserved 1 Rational Rose 2000 Class Diagrams.
1 IBM Software Group ® Mastering Object-Oriented Analysis and Design with UML 2.0 Module 6: Use-Case Analysis.
Faculty of Applied Engineering and Urban Planning Software Engineering Department Software Engineering Lab Use Cases Faculty of Information system Technology.
1 Detail Design: Use-Case Design Background on Use Case Design Have ‘done’ Architectural Design; You know the major (eleven) precepts of good design.
1 Capturing Requirements As Use Cases To be discussed –Artifacts created in the requirements workflow –Workers participating in the requirements workflow.
1 Capturing Requirements As Use Cases To be discussed –Artifacts created in the requirements workflow –Workers participating in the requirements workflow.
What is a Structural Model?
Object-Oriented Modeling: Static Models. Object-Oriented Modeling Model the system as interacting objects Model the system as interacting objects Match.
Requirements Management with Use Cases Module 10: Requirements Across the Product Lifecycle Requirements Management with Use Cases Module 10: Requirements.
OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 1 Object Oriented Analysis and Design Using.
Use Case Textual Analysis
Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall Object-Oriented Systems Analysis and Design Using UML Systems Analysis and Design,
Lecture 14 22/10/15. The Object-Oriented Analysis and Design  Process of progressively developing representation of a system component (or object) through.
Object Oriented Analysis and Design using the UML Use-Case Analysis Adapted by Dr. Spiegel from Slides Provided by Rational Software.
Analysis Yaodong Bi. Introduction to Analysis Purposes of Analysis – Resolve issues related to interference, concurrency, and conflicts among use cases.
UML - Development Process 1 Software Development Process Using UML.
Use Case Model Use case description.
McGraw-Hill/Irwin© 2008 The McGraw-Hill Companies, All Rights Reserved Chapter 17 Object-Oriented Design and Modeling Using the UML.
Gerhard Dueck -- CS3013Analysis 1. Gerhard Dueck -- CS3013Analysis 2 Why analysis?  Yield a more precise specification of the requirements.  Introduce.
OO DomainModeling With UML Class Diagrams and CRC Cards Chapter 6 Princess Nourah bint Abdulrahman University College of Computer and Information Sciences.
High Level Design Use Case Textual Analysis SE-2030 Dr. Mark L. Hornick 1.
OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 1 Use Case Analysis – continued Control Classes.
OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 1 Use Case Analysis – Part 4 Analysis Mechanisms.
Use Case Model Use case diagram.
OO Domain Modeling With UML Class Diagrams and CRC Cards
Software Design Lecture : 15.
Chapter 22 Object-Oriented Systems Analysis and Design and UML
Use Case Analysis – continued
Software Development Process Using UML Recap
Presentation transcript:

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 1/29 Object Oriented Analysis and Design Using the UML Use Case Analysis Modified considerably by your Instructor

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 2/29 Objectives: Use-Case Analysis  Understand the purpose of Use-Case Analysis and where in the lifecycle it is performed  Identify the classes needed to accommodate a use- case flow of events (Analysis Classes)  Distribute the use-case behavior to those classes, identifying responsibilities of the classes  The analysis classes and the initial use-case realizations are the key model elements that we develop in this activity.

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 3/29 Use Case Analysis  The focus during Use-Case Analysis is on a particular use case.  In Use-Case Analysis, we identify the analysis classes and define their responsibilities.  (At this time, we speak of ‘responsibilities.’ (May even use the term, ‘services.’) Later, these might become ‘methods’ or ‘member functions.’ But that is a matter for implementation NOT initial design.)  The allocation of responsibility is modeled in use-case realizations that describe how analysis classes collaborate to perform (realize) use cases.

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 4/29 Supplementary Specifications Glossary Use-Case Model Use-Case Analysis Use-Case Modeling Guidelines Use-Case Realization (developed) Design Model Analysis Classes Analysis Model (optional) Use-Case Analysis Overview Software Architecture Document – (don’t really have this one yet.) Use Case Analysis is performed By the Designer – once per Iteration per use case realization

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 5/29 Use Case Analysis - Purpose  To identify analysis classes which perform a use case’s flow of events  To distribute the use case behavior to those classes  Remember: domain entities do not contain behaviors…  Use case analysis result in logical abstractions with attributes and behaviors.  To identify the responsibilities, attributes and associations of the classes  Input Artifacts – see previous slide  Output Artifacts:  Analysis Classes  Analysis Model  Partially Developed Use-Case Realizations  Work toward Design Model (first cut, really)

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 6/29 Use-Case Analysis Steps – Major ones  1. Supplement the Use-Case Description  Will be changing some as we continue to examine our Use Cases and add alternative, exception, and other flows.  We modify as we learn more and analyze…  2. For (each use-case realization) Do:  Study Use Case flow of events - identify analysis classes from the Use Case narrative. These consist of interface, control, & data classes.  Allocate behaviors (responsibilities) to these classes. These are the little things the class must do….in some cases, these are merely options afforded to the user like add new customer() or delete customer ()….display customer profile…  Distribute Use-Case Behaviors to Classes that you identify  Describe Attributes (properties) of each analysis class.  Show associations between the collaborating classes.  Let’s look at each of these two major items in particular….

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 7/29 Use-Case Analysis Steps  1. Supplement the Use-Case Description  Capture additional information in order to understand the required internal behaviors.  It is quite customary to make changes (or should be….)  This is part of the iterative process. Versioning of Use Cases.  This is why we spend so much time on getting those use cases right – recall, Use Cases drive the whole shooting match!  Update / collapse flows of events as needed  But this is difficult to do. Consider 

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 8/29 The system displays a list of course offerings. The system retrieves and displays a list of current course offerings from the course catalog legacy database given specific parameters, such as... Supplement the Use-Case Description  Sometimes the description of the use case is not sufficient for identifying analysis classes and their objects.  Remember, customer (who should be the responsible person for the use cases) doesn’t care about the inside of the system, so many details may have been left out – leaving the use case description like a black box. Many times we do not have enough detail.

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 9/29  1. Supplement the Use-Case Description  2. For (each use-case realization), Do:  Find Classes from Use-Case Behavior  May be easier now to identify our candidate analysis classes for the system (candidate means ‘first cut;’ ‘possible’ classes) Identify a set of candidate analysis classes capable of performing the behaviors (actions; ‘verbs’) described in the use case. These are ‘responsibilities’ of these classes. Use-Case Analysis Steps

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 10/29  Find Candidate Classes from Behavior (1 of 2)  Will use three ‘divisions of responsibilities’ of the system to identify these classes.  Look for Classes that form:  The ‘boundary’ between the system and its actors  The ‘information’ the system uses  The ‘control logic’ of the system  Will use ‘stereotypes’ to represent these classes.  (These are conveniences used during analysis some of which will disappear or be transitioned into different design elements during the design process when some of these classes become design or software classes..)  This approach leads to a more robust design, as these things are likely to change during design. This way we can isolate them according to their use in the application.

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 11/29 > Find Classes From Use-Case Behavior  The complete behavior of a use case must be distributed to analysis classes  We must ‘identify’ these classes – give a name and briefly describe what they do in a few sentences.

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 12/29 Kinds of Analysis Classes  The boundary between the system and its actors (interfaces… to end-users, external systems, devices…)  The information a system uses (data), and  The control logic of the system (who does what)  So, we isolate the different kinds of concerns and use analysis classes to capture these responsibilities.  Each category of analysis class has a typical set of duties & responsibilities

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 13/29 > System boundary Use-case behavior coordination System information What is an Analysis Class? Can use with the name of the stereotype In angle brackets or as symbols with unique icons.  Finding a candidate set of classes is the first part of transforming a mere statement of required behavior in a use case to a description of how the System will work. So, we start with Analysis Classes.

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 14/29 Analysis Classes – an Early Conceptual Model  The analysis classes, taken together, represent an early conceptual model of the system.  This conceptual model evolves quickly and remains fluid for some time as different representations and their implications are explored. (Consider boundary classes that form a user interface…)  Analysis classes rarely survive into the design unchanged. (But some do!) Don’t spend a lot of time here.  Analysis classes allow us to distribute responsibilities some of which will be later reallocated.  Many analysis classes represent whole collaborations of objects

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 15/29 Use CasesAnalysis Classes Source Code ExecDesign Elements Use-Case Analysis Analysis Classes: A First Step Towards Executables (…from a structural perspective; static)

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 16/29 > Analysis class stereotype What is a Boundary Class?  Insulates the system from changes in the outside  Three types of Boundary Classes  1. User interface classes – classes that facilitate communication with human users of the system Menus, forms, windows, etc. User interface classes….  2. System interface classes – classes which facilitate communications with other systems. Very Important! These boundary classes are responsible for managing the dialogue with the external system, like getting data from an existing database system or flat file… Provide an interface to that system (like a VSAM file)  3. Device Interface Classes – provide an interface to devices which detect external events – like a sensor or …  One boundary class per use case/actor pair

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 17/29 Customer > The Role of a Boundary Class Boundary class - used to model interaction between system’s surroundings and its inner workings. Boundary Classes model parts of the system that depend on its surroundings. Entity and control classes model parts that are independent of system’s surroundings.. Examples of boundary classes: Classes that handle GUI or communications protocols. Actors can only communicate with boundary classes. Boundary classes identify the system’s boundaries. External Database >

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 18/29 Boundary Classes - more  Identify boundary classes for actor interactions mentioned in the flow of events of the use-case  Consider the source for all external events and make sure there is a way for the system to detect these events (user inputs/responses, connecting to an external file, detecting a buzzer, detecting a thermostat value...  Heuristic: initial identification of boundary classes: one boundary class per actor/use- case pair. 

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 19/29 Course Catalog SystemRegister for CoursesStudent > RegisterForCoursesForm > CourseCatalogSystem Example: Finding Boundary Classes  One boundary class per actor/use case pair: The RegisterForCoursesForm contains a Student's "schedule-in-progress". It interfaces with the actor and displays a list of Course Offerings for the current semester from which the Student may select specific courses to be added to his/her Schedule. (Note that this description comes directly from the use case specification. We capture that behavior and encapsulate it (for now) into a boundary class with this description.) The CourseCatalogSystem interfaces with the legacy system that provides the unabridged catalog of all courses offered by the university. Two boundary classes:

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 20/29 Boundary Class – As a User Interface class  1. Concentrate: what information is presented to user  Do NOT concentrate on the UI details (windows, forms…)  Analysis Classes are meant to be a first cut at the abstraction of the system.  The boundary classes may be used as ‘holding places’ for GUI classes. (Addressed in more detail later in design)  Do not do a GUI design in analysis, but isolate all environment-dependent behavior. (Likely you may be able to reverse engineer a GUI component and tailor it.)  If prototyping the interface has been done, these screen dumps or sketches may be associated with a boundary class.  Only model the key abstractions of the system like a form or profile…– not every button, list, etc. in the GUI.

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 21/29 Boundary Classes – As External System and Device classes  2-3. System and Device Interface Classes  Concentrate on what protocols must be defined Note that your application must interface with an existing information source, like a RDBMS...  Do NOT concentrate on how the protocols will be implemented! Merely note that there is an interface.  If the interface to an existing system or device is already well-defined, the boundary class responsibilities should be derived directly from the interface definition.  If there is a working communication with the external system or device, make note of it for later reference during design. (This is more than likely the case…)

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 22/29 Glossary Business-Domain Model Environment Independent > Analysis class stereotype Use Case Architectural Analysis Abstractions What is an Entity Class? (recall: boundary, entity, control…) Key abstractions of the system (What does that mean?) Entity classes show the logical data structure, which will help us understand what the system is supposed to offer to its users. Sources for entity Classes: Glossary Use-Case Flow of Events Domain Model things ……

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 23/29 Entity Classes  Represent stores of information in the system  Used to represent the key concepts the system manages. (Core Abstractions)  The main responsibilities of entity classes are to store and manage information in the system.  Entity objects (instances of entity classes) hold and update information on some phenomenon, such as an event, a person, or some real-life object.  (Chapter advisor, memorabilia, university, student, correspondence_item, International_Secretary, Provider, Worker, account, inventory-item, …)  What are the ‘nouns’ in the use-case specification??  Often persistent; may well come from domain model (business entities)

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 24/29 Customer > The Role of an Entity Class Entity objects are usually not specific to one use-case realization; The values of an entity object and their relationships are often given by an actor. Entity objects are independent of the environment (actors) Entity objects can have complicated behavior ; however, unlike other objects, this behavior is strongly related to the phenomenon the entity object represents.

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 25/29 Example: Finding Entity Classes  Use use-case flow of events, the domain model, and glossary as inputs.  The more of these you have the better you are!  Traditional, filtering nouns approach (but I’d recommend using classes from the domain model (business entities) as a starting place, if available)  Underline noun clauses in the use-case flow of events  Remove redundant candidates; Lots of synonyms!  Remove vague candidates  Remove actors (out of scope)  Remove implementation constructs  Remove attributes (save for later) Lots of times, candidate ‘nouns’ may become ‘attributes’ in classes. (e.g. Student, gpa, major …)  Remove operations

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 26/29 StudentCourseOfferingSchedule Example: Candidate Entity Classes  Register for Courses Use Case  Specific scenario? Likely, Create Schedule. A specific offering for a course including days of week and times The courses a student has selected for current semester Note: these are candidate (analysis) entity classes only. So far, they do not possess responsibilities, attributes, associations, etc… A person enrolled in classes at the university

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 27/29 Candidate Entity Classes – Actors – same name?  Sometimes there’s a need to model information within the system. This is not the same as modeling the actor (actors are external. by definition) with the same name.  A course registration system maintains information about the Student object which is independent of the fact that the Student also plays a role as an actor of the system.  Completely independent of each other  Student class (entity) will exist whether or not the student is an actor to the system.

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 28/29 Account balance name number Withdraw() CreateStatement() Checking Withdraw() Savings GetInterest() Withdraw() Superclass (parent) Subclasses Generalization Relationship Review: Generalization (in entity classes)  One class shares the structure and/or behavior of one or more classes  “Is-a-kind of” relationship  In analysis, use sparingly  Inheritance relationships may be identified – especially in entity classes. In analysis, generalization should be used to model shared behavioral semantics only (that is, generalization that passes “is a kind of’ test) The use of generalization makes the definition of the abstractions easier to document and understand. When generalization is found, create a common super-class that contains common attributes associations, aggregations, and operations

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 29/29 Student name address FulltimeStudent studentID gradDate ParttimeStudent maxNumCourses Part-timeStudent name address numberCourses Full-timeStudent name address studentID gradDate Without Generalization With Generalization studentID Example: Generalization (Shared Semantics)