OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  1998-1999 Rational Software, all rights reserved 1/18 Use Case Analysis – continued Control Classes.

Slides:



Advertisements
Similar presentations
Deliverable #8: Detailed Design - Overview due: Wednesday, 7 March All Deliverable materials are to be posted into Team Concert. Your to.
Advertisements

Introduction to Rational Rose 2000 v6.5 Copyright © 1999 Rational Software, all rights reserved 1 Rational Rose 2000 Interaction Diagrams.
Object Design Examples with GRASP
Chapters 7 & 9 System Scope
OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 1/20 Interaction Diagrams.
Use Case Diagram © copyright 2001 SNU OOPSLA Lab..
Introduction To System Analysis and Design
Use-case Modeling.
Objects First With Java A Practical Introduction Using BlueJ Designing object-oriented programs How to write code in a way that is easily understandable,
Irwin/McGraw-Hill Copyright © 2004 The McGraw-Hill Companies. All Rights reserved Whitten Bentley DittmanSYSTEMS ANALYSIS AND DESIGN METHODS6th Edition.
Modified from Sommerville’s originalsSoftware Engineering, 7th edition. Chapter 8 Slide 1 System models.
1 SWE Introduction to Software Engineering Lecture 15 – System Modeling Using UML.
OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 1 Interaction Diagrams.
OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 1 Object Oriented Analysis and Design Using.
Lecturer: Dr. AJ Bieszczad Chapter 66-1 Object-Oriented analysis and design Special nature of OO development Use cases Design with UML OO system design.
Requirements Analysis 2 What objects collaborate to achieve the goal of a use case?
C++ Training Datascope Lawrence D’Antonio Lecture 11 UML.
Copyright 2004 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Second Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Appendix.
Detail Design: Use-Case Design
Use Case Analysis – continued
Object Oriented Analysis and Design Using the UML
Unified Modeling Language
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.
UML Sequence Diagrams Michael L. Collard, Ph.D. Department of Computer Science Kent State University.
USE Case Model.
Introduction To System Analysis and design
Chapter 5 Analysis Model. Analysis model (AM) The first step in describing how the system will implement the requirements specification The first step.
ANALYSIS REQUIREMENT ANALYSIS DESIGN IMPLEMENTATION TEST.
System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed.
Copyright 2001 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Appendix A Object-Oriented.
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 20 Object-Oriented.
Requirement Engineering. Review of Last Lecture Problems with requirement Requirement Engineering –Inception (Set of Questions) –Elicitation (Collaborative.
Introduction To System Analysis and Design
SWE © Solomon Seifu ELABORATION. SWE © Solomon Seifu Lesson 10 Use Case Design.
CSC 395 – Software Engineering Lecture 13: Object-Oriented Analysis –or– Let the Pain Begin (At Least I’m Honest!)
OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 1 Building Analysis Classes.
Sommerville 2004,Mejia-Alvarez 2009Software Engineering, 7th edition. Chapter 8 Slide 1 System models.
Requirements as Usecases Capturing the REQUIREMENT ANALYSIS DESIGN IMPLEMENTATION TEST.
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.
ANALYSIS - II REQUIREMENT ANALYSIS DESIGN IMPLEMENTATION TEST.
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.
Use Case Model Use case diagram.
Object-Oriented Modeling: Static Models. Object-Oriented Modeling Model the system as interacting objects Model the system as interacting objects Match.
Use Case Model Use case diagram. Relevant Requirements Artifacts Use-Case Model Supplementary Specification Use-Case Specifications... Glossary Actors.
Introduction to OOAD and the UML
OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 1 Object Oriented Analysis and Design Using.
1 IBM Software Group ® Essentials of Visual Modeling with UML 2.0 Module 5: Interaction Diagrams.
22 August, 2007Information System Design IT60105, Autumn 2007 Information System Design IT60105 Lecture 8 Use Case Diagrams.
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.
UML Review of Use case diagrams. 2 Unified Modeling Language The Unified Modeling Language™ (UML) was developed jointly by Grady Booch, Ivar Jacobson,
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.
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.
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.
Lec-5 : Use Case Diagrams
Use Case Model Use case diagram.
Use Case Analysis – continued
Design Yaodong Bi.
Use Case Analysis – continued
Introduction to OOAD and the UML
Presentation transcript:

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 1/18 Use Case Analysis – continued Control Classes Building Analysis Classes (Modified considerably by your Instructor)

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 2/18 Control Classes  A class used to model control behavior specific to one or more use cases.  Encapsulate use-case-specific behavior.  Behavior of a control object is closely related to the realization of a specific use case.  Might ‘say’ control objects "run" the use-case realizations.  Some control objects can participate in more than one use-case realization if the use-case tasks are strongly related.  Similarly, some use cases may require more than one control class; but in general, there is a one-to-one correspondence – as a heuristic.

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 3/18 Use Case Use-case dependent, Environment independent > Analysis class stereotype What is a Control Class?  Is a Use-case behavior coordinator;  sequences; controls; orchestrates use-case.  One control class per use case (generally)

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 4/18 Control Classes – not always needed  Provides coordinating behavior in the system.  The system sometimes can perform some use cases without control classes (just using entity and boundary classes) – particularly use case only involves simple manipulation of stored information.  Complex use cases generally require one or more control classes to coordinate the behavior of other objects in the system.  Examples of control classes include Transaction managers, Resource coordinators and Error handlers. Think about these activities!!

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 5/18 Control Classes decouple :  Decouple boundary objects from one another, making the system more tolerant of changes in the system boundary.  Boundary objects may be several; can make cohesive, separate, easy to change / modify…  Also decouple from control classes use-case behaviors to the entity objects, making them (the entity objects) more reusable across use cases and systems.  Note: we are in the initial stages of ‘design’  Decoupling may positively affect some of the non- functional requirements (that are addressed in design in considerable detail), such as maintainability, performance, reusability.

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 6/18 Control Class provided behavior :  Surroundings-independent (does not change when the surroundings / environment change)  Define control logic  Order/Direct sequence of activities to realize the use- case. (Consider Registering for Courses use case….  Changes little if the internal structure or behavior of the entity classes changes  Control Classes use or set the contents of entity classes, and thus need to coordinate behaviors of entity classes  Is not performed in the same way every time it is activated (flow of events features several states)  One recommendation for the initial identification of control classes is one control class per use case.

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 7/18 The Role of a Control Class Coordinate the use-case behavior Customer > Several control objects of different control classes can participate in one use case. This is particularly true if the use case is rather complex and requires much coordination of access of entity objects, etc. As stated, not all use cases require a control object but most do – at least one. Example: if the flow of events in a use case is related to one entity object, a boundary object may realize the use case in cooperation with the entity object. You can start by identifying one control class per use case realization, and then refine this as more use-case realizations are identified and commonality is discovered. Database

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 8/18 Role of Control Class and Control Objects  Control classes contribute to understanding the system.  Represents the dynamics of the system,  Handles the main tasks and control flows.  When the system performs the use case, a control object is created.  Control Objects usually die once their corresponding use case or scenario (story) has been performed.  (Normally NOT persistent)

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 9/18 Course Catalog SystemRegister for CoursesStudent > RegistrationController Example: Finding Control Classes  Recommend: Identify one control class per use case (again)  Each control class is responsible for orchestrating/controlling the processing that implements the functionality described in the associated use case. Here, the RegistrationController > class has been defined to orchestrate the Register for Courses processing (sequencing of activities) within the system.  (Controller accepts inputs, ‘knows’ where required data and functionality reside, sends key messages to entities, sequences all actions to satisfy use case, sends data back to input actor via boundary objects, etc….)

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 10/18 Now, Summarizing Analysis Classes in general:  Summary of Analysis Classes: View of Participating Classes (VOPC)  For each use-case realization (note the loop) there is one or more class diagrams depicting its participating classes, along with their relationships.  Such class diagrams have been called “View of Participating Classes” diagrams (VOPC, for short) – next overhead…

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 11/18 Student Course Catalog System Register for Courses Use-Case Diagram Analysis Model (classes only listed – no relationships shown here…) > RegisterForCoursesForm > CourseCatalogSystem > RegistrationController > Student > Schedule > CourseOffering Example: Summary: Analysis Classes - VOPC The diagram shows the classes participating in the Register for Courses use case The part-time student and full-time student classes have been omitted for brevity (they both inherit from Student. Class relationships will be discussed later.

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 12/18  Supplement the Use-Case Descriptions  For each use-case realization  Find Classes from Use-Case Behavior - DONE! But nothing in them!  Distribute Use-Case Behaviors to these Classes Now we need to allocate responsibilities of the use cases to the analysis classes and model this allocation by describing the way the class instances collaborate to perform the use case in use-case realizations. Purpose of Distributing Use Case Behavior to Classes is to:  Express the use-case behavior in terms of collaborating objects, and thus  Equivalently: Determine the responsibilities of analysis classes.  For each resulting analysis class, do: (see loop?)  Describe Responsibilities (behaviors)  Describe Attributes and Associations (lectures ahead and following…)  Qualify Analysis Mechanisms (more coming on this last item; quality metrics; non-functional requirements, such as persistence…) Use-Case Analysis Steps – Next Major Step…

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 13/18 Use Case Use-Case Realization Sequence Diagrams Collaboration Diagrams Distribute Use-Case Behaviors to Classes  For each use-case flow of events: (Note: this is a loop!!!)  Identify analysis classes (Step thru flow of events)  Have identified classes. Now, see where they are applied in the use case flow of events.  Static: Allocate use-case responsibilities to analysis classes (look for the verbs and actions in use case flow…)  Dynamic: Model analysis class interactions in interaction diagrams  need to show interactions of system with its actors.  Interactions all begin with an actor, who invokes the use case (Use cases don’t start themselves!)

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 14/18 Interactions among Actors? No.  Interactions BETWEEN actors should NOT be modeled. (Can show inheritance, surrogates, etc. but no ‘interactions.’)  By definition, actors are external, and are out of scope of the system being developed.  Thus, you do not include interactions between actors in your system model.  How to distribute behavior to classes:

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 15/18 Guidelines: Allocating Responsibilities to Classes  This allocation of responsibilities is crucial!  Use analysis class stereotypes as a guide  Boundary Classes (the Interface) Behaviors that involves communication with an actor  Entity Classes (Persistent Data) Behaviors that involves the data encapsulated within the abstractions. (All data manipulation, retrieval…)  Control Classes (the Use Case flow of events) Behaviors specific to a use case or part of a very important flow of events  Notice, all these allocations are of behaviors. (continued)

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 16/18 Guidelines: Allocating Responsibilities to Classes (cont.)  A driving influence on where a responsibility should go is the location of the data needed to perform the operation.  Who has the data needed to perform the responsibility?  Example: “System displays Patient data on monitor.” Where is the patient data? Patient object. (entity object) Who can ‘get’ the data? Patient object! (may imply a retrieval from a database, but ultimately the patient object has the data and the responsibility to get it.)  Who coordinates (issues message to patient object) to get this data? Control class.  Once the data is ‘obtained,’ who will “display” the data to the actor? Boundary class. Look for data and verbs and nouns!

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 17/18 Guidelines: Allocating Responsibilities to Classes (cont.)  Design options :  For a class that has the data, put the responsibility for access, for manipulation, for modification, etc. with the data – best case!!!  If multiple classes have the data: 1. Put the responsibility with one class and add a relationship to the other (a dependency relationship) 2. Create a new class, put the responsibility in the new class, and add relationships to classes needed to perform the responsibility 3. Put the responsibility in the control class, and add relationships to classes needed to perform the responsibility

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 18/18 Guidelines: Allocating Responsibilities to Classes (cont.)  Be careful when adding relationships -- all relationships should be consistent with the abstractions they connect.  Don’t just add relationships to support the implementation without considering the overall affect on the model.  When a new behavior is identified, check to see if there is an existing class that has similar responsibilities, reusing classes where possible.  Only when sure that there is not an existing object that can perform the behavior should you create new classes.