22
Use Case Model Shinta P. Rekayasa Perangkat Lunak

Use Case Model Shinta P.. UML Actor An actor is behaviored classifier which specifies a role played by an external entity that interacts with the subject

Embed Size (px)

Citation preview

Page 1: Use Case Model Shinta P.. UML Actor An actor is behaviored classifier which specifies a role played by an external entity that interacts with the subject

Use Case Model

Shinta P.

Rekayasa Perangkat Lunak

Page 2: Use Case Model Shinta P.. UML Actor An actor is behaviored classifier which specifies a role played by an external entity that interacts with the subject

UML Actor

An actor is behaviored classifier which specifies a role played by an external entity that interacts with the subject (e.g., by exchanging signals and data), a human user of the designed system, some other system or hardware using services of the subject.

Page 3: Use Case Model Shinta P.. UML Actor An actor is behaviored classifier which specifies a role played by an external entity that interacts with the subject

• Standard UML notation for actor is "stick man" icon

• Custom icons that convey the kind of actor may also be used to denote an actor, such as using a separate icon(s) for non-human actors

Page 4: Use Case Model Shinta P.. UML Actor An actor is behaviored classifier which specifies a role played by an external entity that interacts with the subject

Relationships Between Actors

• Generalization between actors is rendered as a solid directed line with a large arrowhead (same as for generalization between classes).

Page 5: Use Case Model Shinta P.. UML Actor An actor is behaviored classifier which specifies a role played by an external entity that interacts with the subject

• An association between an actor and a use case indicates that the actor and the use case communicate with each other.

• An actor could be associated to one or several use cases.

Page 6: Use Case Model Shinta P.. UML Actor An actor is behaviored classifier which specifies a role played by an external entity that interacts with the subject

Use case may have one or several associated actors. It may not be obvious from use case diagram which actor initiates the use case, i.e. is "primary actor". (In non-standard UML, primary actors are those using system services, and supporting actors are actors providing services to the system.)

Page 7: Use Case Model Shinta P.. UML Actor An actor is behaviored classifier which specifies a role played by an external entity that interacts with the subject

UML Use Case

• use case describes a unit of complete and useful functionality that the subject provides to its users.

• Use case is usually shown as an ellipse containing the name of the use case.

• Name of the use case could also be placed below the ellipse.

Page 8: Use Case Model Shinta P.. UML Actor An actor is behaviored classifier which specifies a role played by an external entity that interacts with the subject

• Use cases visually located inside the system boundaries are use cases applicable to the subject (but not necessarily owned by the subject).

Page 9: Use Case Model Shinta P.. UML Actor An actor is behaviored classifier which specifies a role played by an external entity that interacts with the subject

Use Case Extend

• Extend is a directed relationship that specifies how and when the behavior defined in usually supplementary (optional) extending use case can be inserted into the behavior defined in the extended use case.

Page 10: Use Case Model Shinta P.. UML Actor An actor is behaviored classifier which specifies a role played by an external entity that interacts with the subject

Use Case IncludeThe include relationship could be used: to simplify large use case by splitting it into several use cases,to extract common parts of the behaviors of two or more use cases.

Page 11: Use Case Model Shinta P.. UML Actor An actor is behaviored classifier which specifies a role played by an external entity that interacts with the subject

Use Case Relationships Compared

Page 12: Use Case Model Shinta P.. UML Actor An actor is behaviored classifier which specifies a role played by an external entity that interacts with the subject

How to Draw UML Use Case Diagram

Define SubjectDefine ActorsDefine Use Case

Page 13: Use Case Model Shinta P.. UML Actor An actor is behaviored classifier which specifies a role played by an external entity that interacts with the subject

13

Eg: Home Heating Use-Case Diagram

Page 14: Use Case Model Shinta P.. UML Actor An actor is behaviored classifier which specifies a role played by an external entity that interacts with the subject

05-Use-Cases 14

Home Heating Use-Cases

Use case: Power UpActors: Home Owner (initiator)Type: Primary and essentialDescription: The Home Owner turns the power on. Each room

is temperature checked. If a room is below thethe desired temperature the valve for the room is opened, the water pump started. If the water temp falls

below threshold, the fuel valve isopened, and the burner ignited. If the temperature in all rooms is above the desiredtemperature, no actions are taken.

Cross Ref.: Requirements XX, YY, and ZZUse-Cases: None

Page 15: Use Case Model Shinta P.. UML Actor An actor is behaviored classifier which specifies a role played by an external entity that interacts with the subject

05-Use-Cases 15

Modified Home Heating

Home Owner

MH

Power Up

Power Down

Change Temp.

Home Heating

Adjust Temp

Temp. High

Temp. Low

«includes»

«includes»

«includes»

«includes»

Page 16: Use Case Model Shinta P.. UML Actor An actor is behaviored classifier which specifies a role played by an external entity that interacts with the subject

05-Use-Cases 16

Modified:Home Heating Use-Cases

Use case: Power UpActors: Home Owner (initiator)Type: Primary and essentialDescription: The Home Owner turns the power on.

Perform Adjust Temp. If the temperature in all rooms isabove the desired temperature, no actions are taken.

Cross Ref.: Requirements XX, YY, and ZZUse-Cases: Perform Adjust Temp

*

Page 17: Use Case Model Shinta P.. UML Actor An actor is behaviored classifier which specifies a role played by an external entity that interacts with the subject

05-Use-Cases 17

Modified:Home Heating Use-Cases

Use case: Adjust TempActors: System (initiator)Type: Secondary and essentialDescription: Check the temperature in each room. For each room:

Below target: Perform Temp LowAbove target: Perform Temp High

Cross Ref.: Requirements XX, YY, and ZZUse-Cases: Temp Low, Temp High

*

Page 18: Use Case Model Shinta P.. UML Actor An actor is behaviored classifier which specifies a role played by an external entity that interacts with the subject

05-Use-Cases 18

Modified:Home Heating Use-Cases

Use case: Temp LowActors: System (initiator)Type: Secondary and essentialDescription: Open room valve, start pump if not started.

If water temp falls below threshold,open fuel value and ignite burner.

Cross Ref.: Requirements XX, YY, and ZZUse-Cases: None

*

Page 19: Use Case Model Shinta P.. UML Actor An actor is behaviored classifier which specifies a role played by an external entity that interacts with the subject
Page 20: Use Case Model Shinta P.. UML Actor An actor is behaviored classifier which specifies a role played by an external entity that interacts with the subject

Proses Analisis Beorientasi ObjekRational Unified Process (RUP)

Page 21: Use Case Model Shinta P.. UML Actor An actor is behaviored classifier which specifies a role played by an external entity that interacts with the subject

Airport Check-In and Security Screening

• This is an example of Business Use Case Diagram which is created during Business Modeling and is rendered here in notation used by Rational Unified Process (RUP).

• Business actors are Passenger, Tour Guide, Minor (Child), Passenger with Special Needs (e.g. with disabilities), all playing external roles in relation to airport business.

• Business use cases are Individual Check-In, Group Check-In (for groups of tourists), Security Screening, etc. - representing business functions or processes taking place in airport and serving the needs of passengers.

• Business use cases Baggage Check-in and Baggage Handling extend Check-In use cases, because passenger might have no luggage, so baggage check-in and handling are optional.

Page 22: Use Case Model Shinta P.. UML Actor An actor is behaviored classifier which specifies a role played by an external entity that interacts with the subject