1 / 23

Use Cases

Use Cases. Use case. What is a Use Case Diagram ?. A use case diagram illustrates The system and all its actors The use cases developed for the system The interaction between the actors and the use cases. Creating a Use Case diagram. Create a Use Case diagram in the Use Case view

nehru-garza
Download Presentation

Use Cases

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. Use Cases Use case

  2. What is a Use Case Diagram ? • A use case diagram illustrates • The system and all its actors • The use cases developed for the system • The interaction between the actors and the use cases

  3. Creating a Use Case diagram • Create a Use Case diagram in the Use Case view • Add actors, use cases, and relationships • Any number of Use Case diagrams can be created in a Rose model • Use Case diagrams can be nested under any Use Case

  4. Use Case Diagram for the Course Registration Problem

  5. Uses and Extends • You can show uses and extends relationships between use cases in the use case diagram • Use the generalization relationship line • For extends, point toward the main use case • For uses, point away from the main use case • In the specification for the relationship, in the stereotype box, put either uses or extends as desired • Right mouse click on the relationship to show the stereotype

  6. Documenting Use Cases • The flow of events for a Use case is described in • Documentation window • High level description of the use case • External documents • Flow of events • Sequence diagrams or Collaboration diagrams • Flow of events

  7. The Documentation Window • The Documentation Window provides the capability to create, view, and/or modify the documentation for a selected item on a diagram • There is only one Documentation Window which is updated as different items on a diagram are selected • The Documentation Window • May be visible or hidden • May be docked or floating

  8. Documentation Window Example

  9. External documents • The flow of events for a use case may be contained in an external document which is linked to the use case • In the use case specification window, select the files tab • Use the right mouse button to insert • You can insert a pointer to any kind of file. Some examples are: • Document files (Frame, SoDA, etc) • URL for a web page

  10. External document example

  11. What are Scenarios ? • A scenario is an instance of a use case • Each use case has a web of scenarios • A Primary scenario • All is well • Secondary scenarios • Exceptions and alternatives to the primary scenario • A scenario may be represented in a Sequence Diagram or on a Collaboration Diagram

  12. Creating a Sequence Diagram • Create a sequence diagram nested inside a Use Case in the Use Case view • Add objects, messages, and reflexive messages to the diagram • Message numbering is optional • Any number of sequence diagrams can be nested under a Use Case • Any number of sequence diagrams can be included in a Rose model • An existing message may be moved as more information is discovered • A new message may be inserted anywhere in a Sequence Diagram • Actors can be included on Sequence Diagrams

  13. Additional Elements • Focus of Control represents the relative time that the flow of control is focused in an object • It represents the time an object is directing messages • Scripts are additional text that may be added to a Sequence Diagram. They are used to convey additional information • Comments for complicated interactions • Iteration over a few steps • Simple branching

  14. Example Sequence Diagram

  15. Collaboration Diagrams • A Collaboration Diagram is an alternate graphical representation of a scenario • Collaboration Diagrams may be created • Independently • Directly from a Sequence Diagram

  16. Creating a Collaboration Diagram • Create a Collaboration Diagram from a Sequence Diagram by selecting the Sequence Diagram and execute Browse:Create Collaboration Diagram • Objects, links, and messages are automatically added • Or create a Collaboration Diagram any time in the usual manner • Add objects and links • Add messages and reflexive messages • Add data flow • Any number of Collaboration Diagrams can be included in a Rose model • Actors can be included on Collaboration Diagrams

  17. Multiple Objects of the Same Class • A message may be sent to multiple objects of the same class • This can be shown by 搒tacking?an object icon

  18. Moving and Inserting Messages • Messages may NOT be moved or inserted in a Collaboration Diagram • A Sequence Diagram must be used • Process • Switch to the Sequence Diagram • Move and/or insert the needed messages • Switch back to the Collaboration Diagram

  19. Exercise: Use Case Diagram • Create the use case diagram for the Course Registration System as shown on page 4

  20. Exercise: Documenting Use Cases • Create the brief description and the flow of events for the 揗aintain Course Info?use case • The use case provides the capability to • Create, modify, and/or delete courses for a semester • Create, modify, and/or delete course offerings (each course has at least one course offering) for a semester • Professors must select courses to teach for a semester before any course offerings may be created • Contained in a printed list available to the Registrar • There cannot be a course offering if a professor is not available to teach the course offering

  21. Important Important Exercise: Drawing a Sequence Diagram • Create a sequence diagram for the primary scenario (all works well) for • Register For Courses, called Create Schedule (include classes): • NewSchedule • ManageSchedule • Course • CourseOffering • Maintain Course Info, called Create a Course (include classes): • ManageCurriculumForm • NewCourseForm • Course • CourseOffering original: NewScheduleForm ManageScheduleForm original: create catalogue

  22. Exercise: Creating a Collaboration Diagram • Create a Collaboration Diagram from the Sequence Diagram

  23. Important Exercise: Create a New Collaboration Diagram • Create a new Collaboration Diagram for the primary scenario of the 揋enerate Catalogue?use case • Name it Create the Catalogue and include classes: • CourseCatalogue • Course • CourseOffering • This use case • Retrieves the name, description, and number of credit hours for each course • Retrieves the location, time, and assigned professor for each course offering • Formats the catalogue • Sends the formatted catalogue information to the printer original: Catalogue

More Related