88
Use-Case Analysis

4b use-case analysis

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: 4b use-case analysis

Use-Case Analysis

Page 2: 4b use-case analysis

2

Topics Use-Case Analysis Overview Use-Case Analysis Steps

Supplement The Use-Case Description Find Classes From Use-Case Behavior Distribute Use-Case Behavior to Classes Describe Responsibilities Describe Attributes and Associations Unify Analysis Classes

Review

Page 3: 4b use-case analysis

3

Objectives: Use-Case Analysis Identify the classes which perform a use-case flow

of events Distribute the use-case behavior to those classes,

identifying responsibilities of the classes Develop Use-Case Realizations that model the

collaborations between instances of the identified classes

Page 4: 4b use-case analysis

4

Use-Case Analysis Overview

SupplementarySpecifications

Glossary

Use-Case Model

Use-CaseAnalysis

Project SpecificGuidelines

Use-Case Realization

Analysis Classes

Analysis Model

Software ArchitectureDocument

Use Case Analysis is performedBy the Designer – once per Iteration per use case realization

Page 5: 4b use-case analysis

5

Use-Case Analysis Steps Supplement the Use-Case Description For each Use-Case Realization

Find Classes from Use-Case Behavior Distribute Use-Case Behavior to Classes

For each resulting analysis class Describe Responsibilities Describe Attributes and Associations Qualify Analysis Mechanisms

Unify Analysis Classes Checkpoints

Page 6: 4b use-case analysis

6

Use-Case Analysis StepsSupplement the Use-Case Description For each Use-Case Realization

Find Classes from Use-Case Behavior Distribute Use-Case Behavior to Classes

For each resulting analysis class Describe Responsibilities Describe Attributes and Associations Qualify Analysis Mechanisms

Unify Analysis Classes Checkpoints

Page 7: 4b use-case analysis

7

Supplement the Use-Case Description

Page 8: 4b use-case analysis

8

Supplement the Use-Case Description For each Use-Case Realization

Find Classes from Use-Case Behavior Distribute Use-Case Behavior to Classes

For each resulting analysis class Describe Responsibilities Describe Attributes and Associations Qualify Analysis Mechanisms

Unify Analysis Classes Checkpoints

Use-Case Analysis Steps

Page 9: 4b use-case analysis

9

Use-Case Realization

Class Diagrams

Sequence Diagrams

Use Case

Collaboration Diagrams

Use-Case Model Design Model

Use Case Use-Case Realization

Page 10: 4b use-case analysis

10

Analysis Classes

Use Cases AnalysisClasses

SourceCode

ExecDesignElements

Use-Case Analysis

A First Step Toward Executables

Page 11: 4b use-case analysis

11

Find Classes from Use-Case Behavior The complete behavior of a use case has to be

distributed to analysis classes

Page 12: 4b use-case analysis

12

What Is an Analysis Class?

Page 13: 4b use-case analysis

13

What Is a Boundary Class? Intermediates between the interface and

something outside the system Several Types

User interface classes System interface classes Device interface classes

One boundary class per actor/use-case pair

Environment Independent

Page 14: 4b use-case analysis

14

The Role of a Boundary Class

Model interaction between the system and its environment

Customer

<<boundary>>

<<boundary>>

<<control>><<boundary>>

<<entity>> <<entity>>

External Database

Page 15: 4b use-case analysis

15

Example: Finding Boundary Classes One boundary class per actor/use case pair

Page 16: 4b use-case analysis

16

Guidelines: Boundary Class User Interface Classes

Concentrate on what information is presented to the user Do NOT concentrate on the UI details

System and Device Interface Classes Concentrate on what protocols must be defined Do NOT concentrate on how the protocols will be

implemented

Concentrate on the responsibilities, not the details!

Page 17: 4b use-case analysis

17

What Is an Entity Class? Key abstractions of the system

Environment Independent

Page 18: 4b use-case analysis

18

The Role of an Entity Class

Store and manage information in the system

Page 19: 4b use-case analysis

19

Example: Finding Entity Classes

Use use-case flow of events as input Key abstractions of the use case Traditional, filtering nouns approach

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

Page 20: 4b use-case analysis

20

Example: Candidate Entity Classes Register for Courses (Create Schedule)

1. Hệ thống lấy danh sách học phần có mở trong học kỳ từ hệ thống Course Catalog System và thể hiện dưới dạng danh sách cho sinh viên chọn.

2. Sinh viên chọn 4 học phần bắt buộc và hai học phần tự chọn từ danh sách trên.

3. Sau khi sinh viên chọn, hệ thống tạo một lịch học chứa những học phần sinh viên đã đăng ký.

4. Sinh viên kiểm tra và xác nhận lịch học, Submit Schedule được thực thi.

Page 21: 4b use-case analysis

21

What Is a Control Class? Use-case behavior coordinator

More complex use cases generally require one or more control classes

Use-case dependent, Environment independent

Page 22: 4b use-case analysis

22

The Role of a Control Class

Coordinate the use-case behavior

Page 23: 4b use-case analysis

23

Example: Finding Control Classes In general, identify one control class per use case.

As analysis continues, a complex use case’s control class may evolve into more than one class

Page 24: 4b use-case analysis

24

Example: Summary: Analysis Classes

Use-Case Model

Design Model

Page 25: 4b use-case analysis

Supplement the Use-Case Description For each Use-Case Realization

Find Classes from Use-Case BehaviorDistribute Use-Case Behavior to Classes

For each resulting analysis class Describe Responsibilities Describe Attributes and Associations Qualify Analysis Mechanisms

Unify Analysis Classes Checkpoints

25

Use-Case Analysis Steps

Page 26: 4b use-case analysis

26

Distribute Use-Case Behavior to Classes For each use-case flow of events:

Identify analysis classes Allocate use-case responsibilities to analysis classes Model analysis class interactions in Interaction diagrams

Page 27: 4b use-case analysis

27

Guidelines: Allocating Responsibilities to ClassesUse analysis class stereotypes as a guide Boundary Classes

Behavior that involves communication with an actor

Entity Classes Behavior that involves the data encapsulated within the

abstraction

Control Classes Behavior specific to a use case or part of a very important

flow of events

Page 28: 4b use-case analysis

28

Allocating Responsibilities to Classes (cont.)

Who has the data needed to perform the responsibility?

If one class has the data, put the responsibility with the data

If multiple classes have the data: Put the responsibility with one class and add a relationship

to the other Create a new class, put the responsibility in the new class,

and add relationships to classes needed to perform the responsibility

Put the responsibility in the control class, and add relationships to classes needed to perform the responsibility

Page 29: 4b use-case analysis

29

Objects Collaborate Objects are useless unless they can collaborate to

solve a problem. Each object is responsible for its own behavior and status. No one object can carry out every responsibility on its own.

How do objects interact with each other? They interact through messages.

Page 30: 4b use-case analysis

30

Objects Interact with Messages A message shows how one object asks another

object to perform some activity.

: Car buyer:RegistrationController :CourseCatalogSystem

getCourseOfferings(forSemester)

Message

Page 31: 4b use-case analysis

31

Interaction Diagrams Generic term that applies to several diagrams that

emphasize object interactions Sequence Diagram

Time oriented view of object interaction

Communication Diagram(or Collaboration Diagram) Structural view of messaging objects

Communication Diagrams

Sequence Diagrams

Page 32: 4b use-case analysis

32

What Is a Sequence Diagram? A sequence diagram is an interaction diagram that

emphasizes the time ordering of messages. The diagram shows:

The objects participating in the interaction. The sequence of messages exchanged.

Sequence Diagram

Page 33: 4b use-case analysis

33

Sequence Diagram Contents: Objects

Anonymous Objects

Lifelines

Named Object

:RegisterForCoursesForm :RegistrationController SWTSU Catalog : CourseCatalogSystem

Page 34: 4b use-case analysis

34

Sequence Diagram Contents: Actor

:RegisterForCoursesForm :RegistrationController SWTSU Catalog : CourseCatalogSystem

: Student : Course Catalog

Actor instancesActor instances

Page 35: 4b use-case analysis

35

Sequence Diagram Contents: Messages

MessageReflexiveMessages

1: create schedule( )

2: get course offerings( )

3: get course offerings(for Semester)

4: get course offerings( )

:RegisterForCoursesForm :RegistrationController SWTSU Catalog : CourseCatalogSystem

: Student : Course Catalog

6: display blank schedule( )

5: display course offerings( )

1: create schedule( )

4: get course offerings( )

Page 36: 4b use-case analysis

36

Execution Occurrence (Focus of control)

1: create schedule( )

2: get course offerings( )

3: get course offerings(for Semester)

4: get course offerings( )

6: display blank schedule( )

:RegisterForCoursesForm :RegistrationController SWTSU Catalog : CourseCatalogSystem

: Student : Course Catalog

5: display course offerings( )

Execution Occurrence

Page 37: 4b use-case analysis

37

Event Occurrence

Event Occurrence

1: create schedule( )

2: get course offerings( )

3: get course offerings(for Semester)

4: get course offerings( )

6: display blank schedule( )

:RegisterForCoursesForm :RegistrationController SWTSU Catalog : CourseCatalogSystem

: Student : Course Catalog

5: display course offerings( )

Page 38: 4b use-case analysis

38

Register for Courses Use Case – Basic flow: Create a Schedule 1. The Student selects "create schedule."

2. The system retrieves a list of available course offerings from the Course Catalog System.

3. The system displays a blank schedule form.

4. The Student selects 4 primary course offerings and 2 alternate course offerings from the list of available offerings. Once the selections are complete the Student selects "submit."

5. Hệ thống tạo một lịch học chứa những học phần sinh viên đã đăng ký.

6. Sinh viên kiểm tra và xác nhận lịch học, Submit Schedule được thực thi.

Page 39: 4b use-case analysis

39

Analysis Classes

Page 40: 4b use-case analysis

40

Example: Sequence Diagram

: Student : RegisterForCoursesForm : RegistrationController : Schedule : Student : Course Catalog : CourseCatalogSystem

1: // create schedule( )

5: // display course offerings( )

2: // get course offerings( )

3: // get course offerings(forSemester)

A list of the available course offerings for this semester are displayed

Student wishes to create a new schedule

6: // display blank schedule( )

At this, point the Submit Schedule subflow is executed.

Sequence Diagram: Register for Courses / Register for Courses - Basic Flow (Submit Schedule)

7: // select 4 primary and 2 alternate offerings( )

8: // create schedule with offerings( )

A blank schedule is displayed for the students to select offerings

9: // create with offerings( )

10: // add schedule(Schedule)

4: // get course offerings( )

Page 41: 4b use-case analysis

41

Use case: WithdrawActor: ClientBrief: To allow the client to withdraw moneyPre-conditions: User already logged-inPost-conditions: Amount is deducted from user’s accountMain flow:

1) Client initiates this usecase by selecting 'withdraw'2) System displays all the accounts related to the Card and

prompts to select any one.3) Client selects one account.4) System prompts for the amount (fast cash or …)5) Client enter amount …

Alternative flows:2) & 3) System selects the only one available account…

ClientUserAccountAmountMoneyCardCash

Identify Nouns

Example: Use case Withdraw of ATM

Page 42: 4b use-case analysis

42

Analysis Classes

WithdrawUI WithdrawControl

Card Account

Page 43: 4b use-case analysis

43

Sequence Diagram – Use case Withdraw

: Client : WithdrawUI : WithdrawControl : Card : Account

1: select withdraw

2: // get accounts(card)

3: // get accounts( )

4: // display accounts( )

5: select account

6: enter amount

7: // withdraw from(selected account, amount)

8: withdraw(amount )

Page 44: 4b use-case analysis

44

Bài tập: Rent Video Use case: Basic flow1. Nhân viên dùng thiết bị quét thẻ thành viên của

khách hàng.2. Hệ thống kiểm tra băng đĩa video thuê quá hạn và

mức độ đáng tin của khách hàng.3. Nhân viên quét mã vạch của các video khách hàng

muốn thuê. Số lượng băng đĩa khách hàng thuê phải nhỏ hơn 8.

4. Nhân viên nhập ngày thuê và hạn trả cho từng bản ghi thuê video.

5. Hệ thống tính toán và hiển thị lệ phí thuê video.6. Sau khi khách hàng thanh toán, nhân viên in biên

nhận thuê video và chọn chức năng Save 7. Hệ thống cập nhật các bản ghi thuê video.

Page 45: 4b use-case analysis

45

Page 46: 4b use-case analysis

46

What Is a Communication Diagram? A communication diagram emphasizes the

organization of the objects that participate in an interaction.

The communication diagram shows: The objects participating in the interaction. Links between the objects. Messages passed between the objects.

Communication Diagrams

Page 47: 4b use-case analysis

47

Example: Communication Diagram

: Student

: RegisterForCoursesForm

: RegistrationController : CourseCatalogSystem

5: display course offerings( )6: display blank schedule( )

: Course Catalog1: create schedule( )

2: get course offerings( )

3: get course offerings(forSemester)

4: get course offerings( )

Page 48: 4b use-case analysis

48

Communication Diagrams: Objects

Objects

: RegisterForCoursesForm

: RegistrationController SWTSU Catalog : CourseCatalogSystem

Page 49: 4b use-case analysis

49

Communication Diagram: Actors

: Student : Course Catalog

: RegisterForCoursesForm

: RegistrationController SWTSU Catalog : CourseCatalogSystem

Actors

Page 50: 4b use-case analysis

50

Communication Diagram: Links and Messages

: Student

: RegisterForCoursesForm

: RegistrationController : CourseCatalogSystem

5: display course offerings( )

6: display blank schedule( )

: Course Catalog1: create schedule( )

2: get course offerings( )

3: get course offerings(forSemester)

4: get course offerings( )

Links

Messages

Page 51: 4b use-case analysis

51

Example: Communication Diagram

: Student

: RegisterForCoursesForm

: RegistrationController

: Schedule : Student

: CourseCatalogSystem

5: // display course offerings( )6: // display blank schedule( )

: Course Catalog

1: // create schedule( )7: // select 4 primary and 2 alternate offerings( )

2: // get course offerings( )8: // create schedule with offerings( )

9: // create with offerings( )

3: // get course offerings(forSemester)

10: // add schedule(Schedule)

4: // get course offerings( )

Page 52: 4b use-case analysis

52

One Interaction Diagram Is Not Good Enough

Page 53: 4b use-case analysis

Semantically equivalent Can convert one diagram to the other without losing any

information

Model the dynamic aspects of a system Model a use-case scenario

Sequence and Communication Diagram Similarities

Page 54: 4b use-case analysis

54

Communication

Diagrams Show relationships in

addition to interactions Better for visualizing

patterns of collaboration Better for visualizing all

of the effects on a given object

Easier to use for brainstorming sessions

Sequence Diagrams

Show the explicit sequence of messages

Better for visualizing overall flow

Better for real-time specifications and for complex scenarios

Communication vs. Sequence Diagrams

Page 55: 4b use-case analysis

Supplement the Use-Case Description For each Use-Case Realization

Find Classes from Use-Case Behavior Distribute Use-Case Behavior to Classes

For each resulting analysis classDescribe Responsibilities Describe Attributes and Associations Qualify Analysis Mechanisms

Unify Analysis Classes Checkpoints

55

Use-Case Analysis Steps

Page 56: 4b use-case analysis

56

Describe Responsibilities What are responsibilities? How do I find them?

// PerformResponsibility

:Client :Supplier

Supplier

// PerformResponsibility

Interaction Diagram

Class Diagram

Page 57: 4b use-case analysis

Example: View of Participating Classes (VOPC) Class Diagram

RegisterForCoursesForm

// submit schedule()// display course offerings()// update schedule()// delete schedule()// confirm schedule deletion()// request schedule delete confirmation()// display schedule()// register for courses()// display possible operations()// save schedule()// create schedule()// select 4 primary and 2 alternate offerings()// display blank schedule()// update offering selections()

<<boundary>>

CourseCatalogSystem

// get course offerings()

<<boundary>>

RegistrationController

// get course offerings()// get current schedule()// delete current schedule()// submit schedule()// is registration open?()// save schedule()// create schedule with offerings()// update schedule with new selections()

<<control>>Student

// get tuition()// add schedule()// get schedule()// delete schedule()// has pre-requisites()

<<entity>>CourseOffering

// add student()// remove student()// close registration()// get number of students()// cancel()// still open?()// add professor()// close()// save()

<<entity>>

Schedule

// commit()// select alternate()// remove offering()// level()// cancel()// get cost()// delete()// submit()// save()// any conflicts?()// create with offerings()// update with new selections()

<<entity>>

Page 58: 4b use-case analysis

Maintaining Consistency: What to Look For

In order of criticality Redundant responsibilities across classes Disjoint responsibilities within classes Class with one responsibility Class with no responsibilities Better distribution of behavior Class that interacts with many other classes

Page 59: 4b use-case analysis

Supplement the Use-Case Description For each Use-Case Realization

Find Classes from Use-Case Behavior Distribute Use-Case Behavior to Classes

For each resulting analysis class Describe ResponsibilitiesDescribe Attributes and Associations Qualify Analysis Mechanisms

Unify Analysis Classes Checkpoints

59

Use-Case Analysis Steps

Page 60: 4b use-case analysis

60

Finding Attributes Properties/characteristics of identified classes Information retained by identified classes “Nouns” that did not become classes

Information whose value is the important thing Information that is uniquely "owned” by an object Information that has no behavior

Page 61: 4b use-case analysis

61

Finding Relationships

Relationship for every link!

Link

Association

CollaborationDiagram

ClassDiagram 0..*

Prime suppliers

0..*

Client Supplier

:Client :Supplier

Client Supplier

PerformResponsibility()

Page 62: 4b use-case analysis

62

Example: What Associations Can You Find?

: CourseOffering

: RegistrationController

: Schedule

: Student

: PrimaryScheduleOfferingInfo

8: any conflicts?( )

: RegisterForCoursesForm

2: submit schedule( )

4: submit( )3: save( )

7: still open?( )9: add student(Schedule)

5: is selected?( )10: mark as enrolled in( )

6: has pre-requisites(CourseOffering)

1: submit schedule( )

: Student

Page 63: 4b use-case analysis

63

Example: VOPC: Finding Relationships

RegisterForCoursesForm

CourseOfferingSchedule0..40..*

Student0..*1

RegistrationController11 1

0..1

0..1

0..1

<<entity>> <<entity>> <<entity>>

<<control>><<boundary>>

primaryCourses

currentSchedule

Page 64: 4b use-case analysis

64

Refine Class Diagram Identify Components (Reusabile)

Aggregation and Composition Super-Sub classes

Page 65: 4b use-case analysis

65

Review: What Is Aggregation? A special form of association that models a whole-

part relationship between an aggregate (the whole) and its parts “is a part-of” relationship

Page 66: 4b use-case analysis

66

Association or Aggregation? If two objects are tightly bound by a whole-part

relationship The relationship is an aggregation.

If two objects are usually considered as independent, although they are often linked The relationship is an association.

When in doubt use association

Page 67: 4b use-case analysis

67

Nhận diện AggregationBốn ngữ nghĩa có thể của Aggregation Sở hữu độc quyền (Exclusive Owns): Order has Order

Line Có sự phụ thuộc tồn tại (không có Order Line nếu không có Order) Không chia sẻ Là thuộc tính cố định (một Order Line không thể chuyển sang Order khác)

Sở hữu (Owns): Car has Tire Không chia sẻ Không là thuộc tính cố định (có thể chuyển tire sang một car khác)

Có (Has): Department has Student Không có sự phụ thuộc tồn tại, co thể chia sẻ.

Thành viên (Member): Meeting has Chairperson Không có đặc trưng gì đặc biệt ngoại trừ là tư cách thành viên

Page 68: 4b use-case analysis

68

Composition and Aggregation Aggregation cơ bản là bất kỳ quan hệ whole–part

Ngữ nghĩa có thể rất mơ hồ Tương ứng với ngữ nghĩa "Has" và "Member". Một đối tượng thành phần (part) có thể thuộc nhiều hơn

một đối tượng bao gồm (whole)

Composition là Aggregation mạnh hơn Tại một thời điểm, mỗi đối tượng thành phần (part) chỉ có

thể thuộc chỉ một đối tượng bao gồm (whole). Có sự phụ thuộc tồn tại từ "part" vào "whole"

Khi đối tượng "whole" bị hủy thì các "part" cũng bị hủy Tương ứng với ngữ nghĩa "ExclusiveOwns" và "Owns"

Page 69: 4b use-case analysis

69

Aggregation and Composition

Quan hệ m*n có thể chấp nhận

Quan hệ m*n không được phép

Các Student có thể trong nhiều CourseOffering.Nếu CourseOffering bị hủy, các Student không bị hủy!

Nếu Order bị xóa, các OrderLIne trong Order cũng bị xóa!

Order OrderLine

1..*1 1..*1

StudentCourseOffering

1..* 0..*1..* 0..*

Page 70: 4b use-case analysis

70

Review: What Is Generalization? A relationship among classes where one class

shares the structure and/or behavior of one or more classes.

Defines a hierarchy of abstractions where a subclass inherits from one or more superclasses. Single inheritance Multiple inheritance

Is an “is a kind of” relationship.

Page 71: 4b use-case analysis

71

Example: Single Inheritance One class inherits from another.

CheckingSavings

Superclass (parent)

Subclasses(children)

Generalization Relationship

Descendents

Ancestor

Account

- balance- name- number

+ withdraw()+ createStatement()

Page 72: 4b use-case analysis

72

Example: Multiple Inheritance A class can inherit from several other classes.

Use multiple inheritance only when needed and always with caution!

FlyingThing Animal

HorseWolfBirdHelicopterAirplane

Multiple Inheritance

Page 73: 4b use-case analysis

Supplement the Use-Case Description For each Use-Case Realization

Find Classes from Use-Case Behavior Distribute Use-Case Behavior to Classes

For each resulting analysis class Describe Responsibilities Describe Attributes and AssociationsQualify Analysis Mechanisms

Unify Analysis Classes Checkpoints

73

Use-Case Analysis Steps

Page 74: 4b use-case analysis

74

Review: Why Use Analysis Mechanisms?

Analysis mechanisms are used during analysis to reduce the complexity of analysis, and to improve its consistency by providing designers with a shorthand representation for complex behavior.

Page 75: 4b use-case analysis

75

Describing Analysis Mechanisms Collect all analysis mechanisms in a list Draw a map of the client classes to the analysis

mechanisms Identify characteristics of the analysis mechanisms

Page 76: 4b use-case analysis

76

Example: Describing Analysis Mechanisms Analysis class to analysis mechanism map

Analysis Class Analysis Mechanism(s)

Student Persistency, Security

Schedule Persistency, Security

CourseOffering Persistency, Legacy Interface

Course Persistency, Legacy Interface

RegistrationController Distribution

Page 77: 4b use-case analysis

77

Analysis mechanism characteristics Persistency for Schedule class:

Granularity: 1 to 10 Kbytes per product Volume: up to 2,000 schedules Access frequency

Create: 500 per day Read: 2,000 access per hour Update: 1,000 per day Delete: 50 per day

Other characteristics

Example: Describing Analysis Mechanisms

Page 78: 4b use-case analysis

78

Supplement the Use-Case Description For each Use-Case Realization

Find Classes from Use-Case Behavior Distribute Use-Case Behavior to Classes

For each resulting analysis class Describe Responsibilities Describe Attributes and Associations Qualify Analysis Mechanisms

Unify Analysis Classes Checkpoints

Use-Case Analysis Steps

Page 79: 4b use-case analysis

79

Unify Analysis Classes

Page 80: 4b use-case analysis

80

Evaluate Your Results

Page 81: 4b use-case analysis

81

Use-Case Analysis Steps Supplement the Use-Case Description For each Use-Case Realization

Find Classes from Use-Case Behavior Distribute Use-Case Behavior to Classes

For each resulting analysis class Describe Responsibilities Describe Attributes and Associations Qualify Analysis Mechanisms

Unify Analysis ClassesCheckpoints

Page 82: 4b use-case analysis

82

Are the classes reasonable? Does the name of each class clearly

reflect the role it plays? Does the class represent a single

well-defined abstraction? Are all attributes and responsibilities functionally

coupled? Does the class offer the required behavior? Are all specific requirements on the class

addressed?

Checkpoints: Analysis Classes

Page 83: 4b use-case analysis

83

Have all the main and/or sub-flowsbeen handled, including exceptional cases?

Have all the required objects been found?

Has all behavior been unambiguously distributed to the participating objects?

Has behavior been distributed to the right objects?

Where there are several Interaction diagrams, are their relationships clear and consistent?

Checkpoints: Use-Case Realizations

Page 84: 4b use-case analysis

84

Review: Use-Case Analysis What is the purpose of Use-Case Analysis? What is an analysis class? Name and describe the

three analysis stereotypes. What is a Use-Case Realization? Describe some considerations when allocating

responsibilities to analysis classes. How many Interaction diagrams should be

produced during Use-Case Analysis?

Page 85: 4b use-case analysis

85

Exercise: Use-Case Analysis Given the following: Use-Case Model, especially the use-case flows of

events Key abstractions/classes The Supplementary Specification The possible analysis mechanisms

Page 86: 4b use-case analysis

86

Exercise: Use-Case Analysis (cont.) Identify the following for a particular use case: The analysis classes, along with their:

Brief descriptions Stereotypes Responsibilities

The collaborations needed to implement the use case

Analysis class attributes and relationships Analysis class analysis mechanisms

Page 87: 4b use-case analysis

87

Exercise: Use-Case Analysis (cont.) Produce the following for a particular use case: Use-Case Realization Interaction diagram for at

least one of the usecase flows of events VOPC class diagram, containing the analysis

classes, their stereotypes, responsibilities, attributes, and relationships

Analysis class to analysis mechanism map

Page 88: 4b use-case analysis

88

Exercise: Use-Case Analysis (cont.) Start with diagramming the basic flow and then do the

other sub-flows if you have time. The Interaction diagrams may be collaboration or

Sequence diagrams. On an Interaction diagram, sending a message to an object means that you are allocating responsibility for performing that task to the object.

Be sure to use the “//” naming convention for responsibilities.

Refer to the following slides if needed: Review: What is a Use-Case Realization Example: Sequence Diagram Example: Collaboration Diagram Example: VOPC Finding Relationship