Presentation is loading. Please wait.

Presentation is loading. Please wait.

Unified Modeling Language User Guide Section 4 - Basic Behavioral Modeling Chapter 16 - Use Cases Chapter 17 - Use Case Diagrams.

Similar presentations


Presentation on theme: "Unified Modeling Language User Guide Section 4 - Basic Behavioral Modeling Chapter 16 - Use Cases Chapter 17 - Use Case Diagrams."— Presentation transcript:

1 Unified Modeling Language User Guide Section 4 - Basic Behavioral Modeling Chapter 16 - Use Cases Chapter 17 - Use Case Diagrams

2 Sung KimCS6359 Chapter 16 Slide 2 Overview Use cases –Include –Extend Actors Modeling behavior of an element. Realizing use cases with collaborations. Modeling the context of a system. Modeling the requirements of a system. Testing from use cases.

3 Sung KimCS6359 Chapter 16 Slide 3 Use Case Definition …User Guide –Description of a set of sequences of actions that a system performs to yield/hasil an observable result of value to an actor. Object-oriented Software Engineering; Jacobson, ‘92 –Narrative document that describes the sequences of events of an actor using a system to complete a process.

4 Sung KimCS6359 Chapter 16 Slide 4 Use Cases Defines “what” without specifying “how”! Specify desired behavior. Promotes communication among: –End users –Domain experts –Architects –Developers –Information Modelers

5 Sung KimCS6359 Chapter 16 Slide 5 Use Cases (cont’d) Represents a set of functional requirements on a system. Achieve/mencapai a tangible/ nyata amount/ jumlah of work. Provide a starting point for test cases. Process loan actor use case name LoanOfficer

6 Sung KimCS6359 Chapter 16 Slide 6 Actor Coherent/saling berlengketan set of roles that users assume when interacting with a system. Human or automated systems. Represents an individual interacting with the system in a specific way. Live outside the system. Connected to use cases through associations. automated system >

7 Sung KimCS6359 Chapter 16 Slide 7 Use Cases and Flow/aliran of Events Typical Course of Events Usually described in informal text or formal structured text. Visualized in interaction diagrams; commonly system sequence diagram. Exceptional flows or variations depicted separately. Identifies when the use case begins and ends.

8 Sung KimCS6359 Chapter 16 Slide 8 Use Cases and Scenarios Scenarios describe a particular/ keterangan sequence through a use case. Real or prototypical values are used. Each sequence defines a set of system operations. System operation: –System level function. –A single interaction between an actor and the system.

9 Sung KimCS6359 Chapter 16 Slide 9 Use Cases and Collaborations Collaboration—a society of classes and other elements that work together to implement the behavior of a use case. Realization of a use case. Place order Order management use case collaborationrealization

10 Sung KimCS6359 Chapter 16 Slide 10 Organizing Use Cases Use packages. Factor common behavior through/dalam relationships. –Generalization –Extend –Include

11 Sung KimCS6359 Chapter 16 Slide 11 Generalized Use Case Child inherits behavior and meaning from parent. Child may be substituted any place for a parent. Rendered/sama same as class generalization.

12 Sung KimCS6359 Chapter 16 Slide 12 Use Case Inclusion Base use case explicitly incorporates/gabung the behavior of another use case. The included use case cannot stand alone. Example of delegation. Rendered as a stereotyped dependency.

13 Sung KimCS6359 Chapter 16 Slide 13 Extending a Use Case Base use case incorporates the behavior of another use case. The extending use case indicates where the extended behavior occurs in the base use case. Base use case only extended through extension points. Used to model optional behavior. Rendered as a stereotyped dependency.

14 Sung KimCS6359 Chapter 16 Slide 14 Use Case Organization Example Track order generalization Validate user Retinal scan Check password Place rush order Place order Extension points: set priority extension inclusion extension point > (set priority) >

15 Sung KimCS6359 Chapter 16 Slide 15 Example (cont’d) Track Order Main flow of control : Obtain and verify the order number. Include (Validate user). For each part in the order, query its status, then report back to the user. Place Order Main flow of control: Include (Validate user). Collect the user’s order items. (set priority). Submit the order for processing.

16 Sung KimCS6359 Chapter 16 Slide 16 Modeling the Behavior of an Element Element could represent –The system as a whole/ keseluruhan. –A subsystem. –An individual class. Important reasons: –Allows domain experts to specify external view to sufficient/ cukup details for developers to continue. –Provides a means for developers to approach mendekatnya and understand an element. –Provides a basis for testing.

17 Sung KimCS6359 Chapter 16 Slide 17 Modeling Behavior (steps) Identify actors that interact with the element. Organize actors by generalized and more specialized roles. Consider/ mempertimbangkan the primary ways actors interact with the element. Consider the exceptional ways actors interact with an element. Organize the behaviors as use cases.

18 Sung KimCS6359 Chapter 16 Slide 18 Hints & Tips on Use Cases Well structured use case: –Names a single, identifiable and atomic behavior. –Factors common behavior through inclusion. –Factors variants by pushing behavior through extension. –Describes the flow of events such/supaya that a non-technical person can follow. –Clarified by a minimal set of scenarios that specify the normal and variant semantics/yg berhub..

19 Sung KimCS6359 Chapter 16 Slide 19 Hints & Tips on Use Cases (cont’d) Depicting a use case: –Show only the use cases that are important to understand the behavior in a particular/kusus context. –Show only the actors related to those use cases.

20 Sung KimCS6359 Chapter 16 Slide 20 Use Case Diagrams Use case diagram—diagram that shows a set of use cases and actors and their relationships. Used to visualize the behavior of a system. Allows users to comprehend/ mengerti the interactions with the system.

21 Sung KimCS6359 Chapter 16 Slide 21 Use Case Diagram (an example) system boundary Place phone call extension actor «extend» Use scheduler Receive phone call Receive additional call Place conference call «extend» Cellular Network use case association Cellular Telephone

22 Sung KimCS6359 Chapter 16 Slide 22 Use Case Diagram Contents Use cases Actors Relationships –Dependencies –Generalizations –Associations Notes and constraints

23 Sung KimCS6359 Chapter 16 Slide 23 Common Uses Model the context of a system. –Identifying the system border. –Defining what is inside the system. –Defining what is outside the system. Model the requirements of a system. –What the system should do. –Independent of how the system will do it!

24 Sung KimCS6359 Chapter 16 Slide 24 Modeling the System Context Identify the actors that surround the system. –Which groups need help from the system. –Which groups are needed to execute system functions. –Which groups interact with external hardware. –Which groups perform secondary functions. Organize actors using generalization if appropriate/ sesuai. Use stereotypes for actors to aid/ bantu understanding. Populate a use case diagram with actors and associate with system use cases.

25 Sung KimCS6359 Chapter 16 Slide 25 Context Example Perform card transaction Customer Credit Card Validation System Process customer bill Reconcile transactions Manage customer account Corporate Customer Retail Institution

26 Slide 26 Modeling System Requirements Establish the system context. Consider/mempertimbangkan the behavior that each actor expects/ menyangka from the system. Name common/ biasa behaviors as use cases. Factor common behavior; extensions, inclusions, and generalizations. Model the actors, use cases, and relationships into a use case diagram. Adorn/ menghiasi with notes for non- functional requirements.

27 Sung KimCS6359 Chapter 16 Slide 27 Modeling System Test Cases For each use case, identify its flow of events. Generate a test script for each flow. –Obtain/ mendapatkan initial state from preconditions/mempersiapkan. –Test success against post conditions. Build necessary/ kebutuhan test drivers to simulate scenarios using test scripts. Use tools to regression/ kemunduran test using the tests.

28 Sung KimCS6359 Chapter 16 Slide 28 Hints & Tips on Use Case Diagrams Well-structured use case diagrams: –Focused on communicating a single aspect of a system’s static use case view. –Contains only actors and use cases essential/yg perlu to that aspect. –Should contain sufficient detail to inform a reader of important system semantics /yg berhub..

29 Sung KimCS6359 Chapter 16 Slide 29 Hints & Tips on Use Case Diagrams (cont’d) Depicting a use case diagram: –Choose a name that communicates purpose. –Minimize crossing of lines. –Physically co-locate semantically related elements. –Use notes and colors for necessary/perlu emphasis. –Only show what is more or less useful!

30 Sung KimCS6359 Chapter 16 Slide 30 Summary Use cases & Actors Typical course of events. Scenarios Collaborations. Organizing use cases. Modeling behavior. Use case diagrams –Definition –Example –Contents –Common uses Modeling system context Modeling system requirements Modeling system test cases


Download ppt "Unified Modeling Language User Guide Section 4 - Basic Behavioral Modeling Chapter 16 - Use Cases Chapter 17 - Use Case Diagrams."

Similar presentations


Ads by Google