1 / 38

Object Oriented Analysis and Design Using the UML Version 4.2

Object Oriented Analysis and Design Using the UML Version 4.2. Module 11: Use-Case Design. Objectives: Use-Case Design. Understand the purpose of Use-Case Design and where in the lifecycle it is performed Verify that there is consistency in the use-case implementation

Download Presentation

Object Oriented Analysis and Design Using the UML Version 4.2

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. Object Oriented Analysis and Design Using the UMLVersion 4.2 Module 11: Use-Case Design

  2. Objectives: Use-Case Design • Understand the purpose of Use-Case Design and where in the lifecycle it is performed • Verify that there is consistency in the use-case implementation • Refine the use-case realizations from Use-Case Analysis using defined design model elements

  3. Use-Case Design in Context Architectural Analysis Review the Architecture Describe Architectural Describe Architecture Reviewer Architect Concurrency Design Distribution Subsystem Design Use-Case Analysis Review the Use-Case Design Design Design Designer Reviewer Class Design

  4. Supplementary Specifications Design Classes Use Case Use-Case Realization Use-Case Design Overview Design Subsystems and Interfaces Use-Case Design Use-Case Realization

  5. Use-Case Design Steps • Describe Interactions Between Design Objects • Simplify Interaction Diagrams Using Subsystems (optional) • Describe Persistence-Related Behavior • Refine the Flow of Events Description • Unify Classes and Subsystems • Checkpoints

  6. Class Diagrams Collaboration Diagrams Sequence Diagrams Use Case Use-Case Realization Review: Use-Case Realization Use-Case Model Design Model Use Case

  7. Use-Case Design Steps • Describe Interactions Between Design Objects • Simplify Interaction Diagrams Using Subsystems (optional) • Describe Persistence-Related Behavior • Refine the Flow of Events Description • Unify Classes and Subsystems • Checkpoints

  8. Class Diagrams Sequence Diagrams Use-Case Realization Refinement • Identify participating objects • Allocate responsibilities amongst objects • Model messages between objects • Describe processing resulting from messages • Model associated class relationships

  9. Use-Case Realization Refinement Steps • Replace applicable classes with the associated subsystem interfaces • Incrementally incorporate applicable architectural mechanisms • Update use-case realization • Interaction diagrams • View of participating classes (VOPC) class diagram(s)

  10. Analysis Classes Design Elements <<boundary>> <<subsystem>> <<subsystem>> BillingSystem CourseCatalogSystem BillingSystem // submit bill() IBillingSystem <<boundary>> CourseCatalogSystem // get course offerings() ICourseCatalogSystem Example: Incorporating Subsystem Interfaces submitBill(forTuition : Double, forStudent : Student) getCourseOfferings(forSemester : Semester) : CourseOfferingList All other analysis classes mapped directly to design classes

  11. : RegisterForCoursesForm : RegistrationController : CourseCatalogSystem : Schedule : Student : Student 1. // create schedule( ) 1.1. // get course offerings( ) Student wishes to 1.1.1. // get course offerings(forSemester) create a new schedule 1.2. // display course offerings( ) A list of the available course offerings for this semester are displayed 1.3. // display blank schedule( ) A blank schedule is displayed for the students to select offerings 2. // select 4 primary and 2 alternate offerings( ) 2.1. // create schedule with offerings( ) 2.1.1. // create with offerings( ) 2.1.2. // add schedule(Schedule) At this point, the Submit Schedule subflow is executed Example: Incorporating Subsystem Interfaces (Before) Replace with subsystem interface

  12. Example: Incorporating Subsystem Interfaces (After) Replaced with subsystem interface : RegisterForCoursesForm : RegistrationController : ICourseCatalogSystem : Schedule : Student : Student 1: // create schedule( ) 1.1: // get course offerings( ) Student wishes to 1.1.1: getCourseOfferings(Semester) create a new schedule 1.2: // display course offerings( ) A list of the available course offerings for this semester are displayed 1.3: // display blank schedule( ) A blank schedule is displayed for the students to select offerings 2: // select 4 primary and 2 alternate offerings( ) 2.1: // create schedule with offerings( ) 2.1.1: // create with offerings( ) 2.1.2: // add schedule(Schedule) At this, point the Submit Schedule subflow is executed.

  13. Example: Incorporating Subsystem Interfaces (VOPC) <<Interface>> Subsystem interface ICourseCatalogSystem <<boundary>> (from External System Interfaces) RegisterForCoursesForm <<control>> 1 (from Registration) 0..* getCourseOfferings() RegistrationController initialize() (from Registration) // submit schedule() // display course offerings() <<entity>> // submit schedule() 1 1 // display schedule() Schedule // save schedule() // save schedule() currentSchedule // create schedule with offerings() (from University Artifacts) 0..1 // create schedule() // getCourseOfferings() semester // select 4 primary and 2 alternate offerings() 0..1 // display blank schedule() 0..1 // submit() // save() registrant 0..1 0..* // any conflicts?() // new() <<entity>> Student. 0..* 0..* (from University Artifacts) - name alternateCourses - address 1 - studentID : int 0..2 primaryCourses <<entity>> 0..4 // addSchedule() CourseOffering // getSchedule() (from University Artifacts) // hasPrerequisites() number // passed() startTime endTime days // addStudent() // removeStudent() // new() // setData()

  14. Incorporating Architectural Mechanisms: Security • Analysis-Class-to-Architectural-Mechanism Map from Use-Case Analysis Analysis Class Analysis Mechanism(s) Student Persistency, Security Schedule Persistency, Security CourseOffering Persistency, Legacy Interface Course Persistency, Legacy Interface RegistrationController Distribution Details in Appendix

  15. Incorporating Architectural Mechanisms: Distribution • Analysis-Class-to-Architectural-Mechanism Map from Use-Case Analysis Analysis Class Analysis Mechanism(s) Student Persistency, Security Schedule Persistency, Security CourseOffering Persistency, Legacy Interface Course Persistency, Legacy Interface RegistrationController Distribution Details in Appendix

  16. Use-Case Design Steps • Describe Interactions Between Design Objects • Simplify Interaction Diagrams Using Subsystems (optional) • Describe Persistence-Related Behavior • Refine the Flow of Events Description • Unify Classes and Subsystems • Checkpoints

  17. Raises the level of abstraction Encapsulating Subsystem Interactions • Interactions can be described at several levels • Subsystem interactions can be described in their own interaction diagrams

  18. When to Encapsulate Sub-Flows in a Subsystem • Sub-flow occurs in multiple use-case realizations • Sub-flow has reuse potential • Sub-flow is complex and easily encapsulated • Sub-flow is responsibility of one person/team • Sub-flow produces a well-defined result • Sub-flow is encapsulated within a single Implementation Model component

  19. <<subsystem>> MySubsystem :InterfaceA InterfaceA op1() Op1() Guidelines: Encapsulating Subsystem Interactions • Subsystems should be represented by their interfaces on interaction diagrams • Messages to subsystems are modeled as messages to the subsystem interface • Messages to subsystems correspond to operations of the subsystem interface • Interactions within subsystems modeled in Subsystem Design

  20. Advantages of Encapsulating Subsystem Interactions • Use-case realizations are less cluttered • Use-case realizations can be created before the internal designs of subsystems are created (parallel development) • Use-case realizations are more generic and easy to change (subsystems can be substituted)

  21. Parallel Subsystem Development • Concentrate on requirements that affect subsystem interfaces • Outline required interfaces • Model messages that cross subsystem boundaries • Draw interaction diagrams in terms of subsystem interfaces for each use case • Refine the interfaces needed to provide messages • Develop each subsystem in parallel Use subsystem interfaces as synchronization points

  22. Use-Case Design Steps • Describe Interactions Between Design Objects • Simplify Interaction Diagrams Using Subsystems (optional) • Describe Persistence-Related Behavior • Refine the Flow of Events Description • Unify Classes and Subsystems • Checkpoints

  23. Use-Case Design Steps: Describe Persistence-related Behavior • Describe Persistence-related Behavior • Modeling Transactions • Writing Persistent Objects • Reading Persistent Objects • Deleting Persistent Objects

  24. Modeling Transactions • What is a Transaction? • Atomic operation invocations • “All or nothing” • Provide consistency • Modeling Options • Textually (scripts) • Explicit messages • Error conditions • May require separate interaction diagrams • Rollback • Failure modes

  25. Incorporating the Architectural Mechanisms: Persistency • Analysis-Class-to-Architectural-Mechanism Map from Use-Case Analysis Analysis Class Analysis Mechanism(s) Student Persistency, Security OODBMS Persistency Schedule Persistency, Security CourseOffering Persistency, Legacy Interface RDBMS Persistency Course Persistency, Legacy Interface RegistrationController Distribution Legacy Persistency (RDBMS ) deferred to Subsystem Design Details in Appendix

  26. Use-Case Design Steps • Describe Interactions Between Design Objects • Simplify Interaction Diagrams Using Subsystems (optional) • Describe Persistence-Related Behavior • Refine the Flow of Events Description • Unify Classes and Subsystems • Checkpoints

  27. : ClassA : ClassB : Actor1 1: Do Something Scripts can be used to describe the details 2: Do Something More surrounding these messages. Notes can include more information about a particular diagram element Detailed Flow of Events Description Options • Annotate the interaction diagrams Script Note

  28. Use-Case Design Steps • Describe Interactions Between Design Objects • Simplify Interaction Diagrams Using Subsystems (optional) • Describe Persistence-Related Behavior • Refine the Flow of Events Description • Unify Classes and Subsystems • Checkpoints

  29. Design Model Unification Considerations • Model element names should describe their function • Merge similar model elements • Use inheritance to abstract model elements • Keep model elements and flows of events consistent

  30. Use-Case Design Steps • Describe Interactions Between Design Objects • Simplify Interaction Diagrams Using Subsystems (optional) • Describe Persistence-Related Behavior • Refine the Flow of Events Description • Unify Classes and Subsystems • Checkpoints

  31. Checkpoints: Design Model • Is package/subsystem partitioning logical and consistent? • Are the names of the packages/subsystems descriptive? • Do the public package classes and subsystem interfaces provide a single, logically consistent set of services? • Do the package/subsystem dependencies correspond to the relationships between the contained classes? • Do the classes contained in a package belong there according to the criteria for the package division? • Are there classes or collaborations of classes which can be separated into an independent package/subsystem? • Is the ratio between the number of packages/subsystems and the number of classes appropriate?

  32. Checkpoints: Use-Case Realizations • Have all the main and/or sub-flows for this iteration been handled? • Has all behavior been distributed among the participating design elements? • Has behavior been distributed to the right design elements? • If there are several interaction diagrams for the use-case realization, is it easy to understand which collaboration diagrams relate to which flow of events?

  33. Review: Use-Case Design • What is the purpose of Use-Case Design? • What is meant by encapsulating subsystem interactions? Why is it a good thing to do?

  34. Exercise: Use-Case Design, Part 1 • Given the following: • Analysis use-case realizations (VOPCs and interaction diagrams) • The analysis-class-to-design-element map • The analysis-class-to-analysis-mechanism map • Analysis-to-design-mechanism map • Patterns of use for the architectural mechanisms (continued)

  35. Exercise: Use-Case Design, Part 1 (cont.) • Identify the following for a particular use case: • The design elements that replaced the analysis classes in the analysis use-case realizations • The architectural mechanisms that affect the use-case realizations • The design element collaborations needed to implement the use case • The relationships between the design elements needed to support the collaborations (continued)

  36. Exercise: Use-Case Design, Part 1 (cont.) • Produce the following for a particular use case: • Design use-case realization • Interaction diagram(s) per use-case flow of events that describes the DESIGN ELEMENT collaborations required to implement the use case • Class diagram (VOPC) that includes the DESIGN ELEMENTS that must collaborate to perform the use case, and their relationships

  37. Exercise: Use-Case Design, Part 2 (optional) • Given the following: • The architectural layers, their packages, and their dependencies • All design use-case realization VOPCs (design elements, their packages, and their relationships) (continued)

  38. Exercise: Use-Case Design, Part 2 (optional) (cont.) • Identify the following: • Any updates to the package relationships needed to support the class relationships • Produce the following diagrams: • Refined class diagram that contains all packages and their dependencies (organized by layer)

More Related