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

Slides:



Advertisements
Similar presentations
Ch:8 Design Concepts S.W Design should have following quality attribute: Functionality Usability Reliability Performance Supportability (extensibility,
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.
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
Use-case Modeling.
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.
Communication Notation Part V Chapter 15, 16, 18 and 19.
SE 555 Software Requirements & Specification1 Use-Case Modeling: Overview and Context.
Irwin/McGraw-Hill Copyright © 2004 The McGraw-Hill Companies. All Rights reserved Whitten Bentley DittmanSYSTEMS ANALYSIS AND DESIGN METHODS6th Edition.
J. Scott Hawker p. 1 Material © IBM Rational Software Use-Case Analysis Analyze the requirements to discover what the system objects are These.
Finding Analysis Classes Written by Zvika Gutterman Adam Carmi.
CREATING THE DESIGN: THE LOGICAL VIEW The Class Diagram.
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.
Objectives Explain the purpose and objectives of object- oriented design Develop design class diagrams Develop interaction diagrams based on the principles.
Use Case Analysis – continued
SE 555 Software Requirements & Specification Requirements Analysis.
Supplementary Information on Analysis Modeling Taken from: Use Case Driven Object Modeling with UML – A Practical Approach by Doug Rosenberg Much of these.
Object Oriented Analysis and Design Using the UML
PRJ566: PROJECT PLANNING AND MANAGEMENT Class Diagrams.
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.
OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 1/29 Object Oriented Analysis and Design Using.
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.
Chapter 7 Structuring System Process Requirements
An Introduction to Software Architecture
12 Systems Analysis and Design in a Changing World, Fifth Edition.
Software Engineering Chapter 7 Fall Capturing the Requirements as Use Cases Capturing the Requirements as Use Cases By using use cases analysts.
SWE © Solomon Seifu ELABORATION. SWE © Solomon Seifu Lesson 10 Use Case Design.
Systems Analysis and Design in a Changing World, 3rd Edition
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 4: Restaurant.
CS3773 Software Engineering Lecture 04 UML Class Diagram.
Requirements as Usecases Capturing the REQUIREMENT ANALYSIS DESIGN IMPLEMENTATION TEST.
7-1 © Prentice Hall, 2007 Chapter 7: Conceptual Data Modeling Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich,
Unit 3 Conceptual Data Modeling. Key Concepts Conceptual data modeling process Classes and objects Attributes Identifiers, candidate keys, and primary.
7-1 © Prentice Hall, 2007 Week 5: Conceptual Data Modeling Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich,
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.
UML Class Diagram Trisha Cummings. What we will be covering What is a Class Diagram? Essential Elements of a UML Class Diagram UML Packages Logical Distribution.
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 What is OO Design? OO Design is a process of invention, where developers create the abstractions necessary to meet the system’s requirements OO Design.
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.
OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 1 Object Oriented Analysis and Design Using.
Architecture View Models A model is a complete, simplified description of a system from a particular perspective or viewpoint. There is no single view.
Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall Object-Oriented Systems Analysis and Design Using UML Systems Analysis and Design,
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.
Rational Unified Process Fundamentals Module 3: Core Workflows I - Concepts Rational Unified Process Fundamentals Module 3: Core Workflows I - Concepts.
UML - Development Process 1 Software Development Process Using UML.
OOD OO Design. OOD-2 OO Development Requirements Use case analysis OO Analysis –Models from the domain and application OO Design –Mapping of model.
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 – Part 4 Analysis Mechanisms.
The Object Oriented Approach to Design
Software Design Lecture : 15.
Object Oriented Analysis and Design Using the UML
Design Yaodong Bi.
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 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 Objectives: Use-Case Analysis  Understand the purpose of Use-Case Analysis and where in the lifecycle it is performed  Identify the classes which perform 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 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.  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 Supplementary Specifications Glossary Use-Case Model Use-Case Analysis Use-Case Modeling Guidelines Use-Case Realization (identified) 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 Use Case Analysis - Purpose  To identify the classes which perform a use case’s flow of events  To distribute the use case behavior to those classes  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  Working toward Design Model

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 6 Use-Case Analysis Steps – Major ones  Supplement the Use-Case Description  Will be changing some as we continue to examine our Use Cases and add alternative, exception, and other flows.  For each use-case realization, do:  Find classes from Use Case behavior – Study Use Case flow of events - identify analysis 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 ()….  Distribute Use-Case Behavior to Classes that you identify  Describe Attributes of each analysis class.  Show associations between the collaborating classes.  Let’s look at each of these in particular….

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 7 Use-Case Analysis Steps  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 why we spend so much time on getting those use cases right – recall, Use Cases drive the whole shooting match!  Update flows of events as needed…..  You will likely collapse some use cases and identify others missed.

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 8 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 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. To find objects that perform the use cases, we may need ‘white box’ descriptions – that is, what does the system do from an internal perspective. From this, some objects may be identified. 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  Supplement the Use-Case Description  For each use-case realization  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) We should be able to identify a set of candidate analysis classes capable of performing the behaviors described in the use case. These are now the ‘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  Find Candidate Classes from Behavior  Will use three ‘division of responsibilities’ of the system to identify these classes. 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.  This approach results in a more robust model because these are the three things that are most likely to change in system and so we isolate them so that we can treat them separately.  This is an attempt at addressing maintainability / scalability and a few other non-functional requirements that are impacted by the architecture.

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

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 12 Discovering Classes  Analysis class modeling represents an early conceptual model for ‘things in the system which have responsibilities and behaviors’.  Analysis classes are used to capture a ‘first- draft’, rough-cut of the object model of the system.  Analysis classes handle primary functional requirements, interface requirements, and some control

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 13 Kinds of Analysis Classes  Three things likely to change in a system:  The boundary between the system and its actors (interfaces…)  The information a system uses (data), and  The control logic of the system (who does what)  So, we isolate the different kinds of analysis classes  Each of these has a set of duties & responsibilities  Again, the distinction between these classes is used in analysis but changes in design or becomes less of an issue, as we transition these analysis classes into design artifacts / design entities to accommodate the problem domain representations in a solutions space.

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

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 15 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.  Don’t spend a lot of time maintaining this model, as this ‘model’ is largely expendable.  Analysis classes rarely survive into the design unchanged.  Many of them represent whole collaborations of objects, often encapsulated by a single subsystems or a reverse engineered component.

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 16 Analysis Classes – Early Conceptual Model  Analysis classes are 'proto-classes', which are essentially "clumps of behavior“ (like the interface windows/screens).  Analysis classes are early conjectures of the composition of the system; they rarely survive intact into implementation.  Many of the analysis classes morph into something else later on (subsystems, components, split classes, combined classes).  They provide us with a way of capturing the required behaviors in a form that we can use to explore the behavior and composition of the system.  Analysis classes allow us to "play" with the distribution of responsibilities, re-allocating, as necessary.

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 17 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 18 > Analysis class stereotype What is a Boundary Class?  Insulates the system from changes in the outside  Several Types of Boundary Classes  User interface classes – classes that facilitate communication with human users of the system Menus, forms, etc. User interface classes….  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 for this system  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 19 Customer > The Role of a Boundary Class. A boundary class is a class used to model interaction between the system’s surroundings and its inner workings; Involves transforming and translating events and noting changes in the system presentation (such as the interface).. Boundary Classes model parts of the system that depend on its surroundings. Entity and control classes model parts that are independent of the 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 20 Boundary Classes - more  Identify boundary classes for things mentioned in the flow of events of the use-case realization.  Consider the source for all external events and make sure there is a way for the system to detect these events. (user inputs/responses? Connection to existing external and/or existing database??…)  One recommendation: for the initial identification of boundary classes is one boundary class per actor/use-case pair.  This class can be viewed as having responsibility for coordinating the interaction with the actor.  This may be (likely will be) refined as a more detailed analysis is performed.  This is particularly true for window-based GUI applications, where there is typically one boundary class for each window, or one for each dialog.

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 21 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 displays a list of Course Offerings for the current semester from which the Student may select to be added to his/her Schedule. 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 22 Guidelines: Boundary Class – User Interface classes  User Interface Classes  Concentrate on what information is presented to the user  Do NOT concentrate on the UI details  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.)  The expansion, refinement and replacement of these boundary classes with actual user interface classes is a very important activity of Class Design – later  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 – not every button, list, etc. in the GUI.

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 23 Guidelines: Boundary Classes – System and Device  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  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.

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 24 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 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

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 25 Entity Classes  Entity classes represent stores of information in the system  Used to represent the key concepts the system manages.  Entity objects (instances of entity classes) are used to hold and update information about some phenomenon, such as an event, a person, or some real-life object.  (Chapter advisor, memorabilia, university, student, correspondence_item, International_Secretary, …)  They are usually persistent, having attributes and relationships needed for a long period, sometimes for the life of the system.  Many of these will come from the Domain Model, and your creation of entity classes will likely result in refinements to the domain model, as you discover that you ‘come up short’ of needed entity classes in your modeling…  The main responsibilities of entity classes are to store and manage information in the system.

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 26 Store and manage information in the system Customer > The Role of an Entity Class Entity objects are usually not specific to one use-case realization; sometime, an entity object is not even specific to the system itself. 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 27 Example: Finding Entity Classes  Use use-case flow of events and 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 as a starting place, if available)  Underline noun clauses in the use-case flow of events  Remove redundant candidates  Remove vague candidates  Remove actors (out of scope)  Remove implementation constructs  Remove attributes (save for later)  Remove operations

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 28 StudentCourseOfferingSchedule Example: Candidate Entity Classes  Register for Courses (Create Schedule) A specific offering for a course including days of week and times The courses a student has selected for current semester A person enrolled in classes at the university

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 29 Candidate Entity Classes - continued  Sometimes there is a need to model information about an actor within the system. This is not the same as modeling the actor (actors are external. by definition).  For example, a course registration system maintains information about the student which is independent of the fact that the student also plays a role as an actor of the system.  This information about the student that is stored in a ‘Student’ class is completely independent of the ‘actor’ role the student plays;  The 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 30 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 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 31 Finding Generalization: Generalization of Classes SavingsChecking Stock Bond RealEstate Asset RealEstate Savings BankAccount CheckingStock Security Bond More general Can generalize when you have a set of classes that share some semantics and behavior Base class subclasses Subclasses have Unique semantics And behavior.

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 32 Finding Generalization: Specialization of Classes Asset RealEstate Savings BankAccount CheckingStock Security Bond More specific More specialized properties are placed in the lower part of the inheritance hierarchy. Do not mistake generalization (inheritance) for hierarchy. Hierarchy involves ‘decomposition.’ IN generalization, we are ‘factoring out commonalities.’ This is MUCH different than hierarchy. Here, the motivation is for reuse and extensibility….

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 33 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)