220 likes | 365 Views
Rekayasa Perangkat Lunak. Use Case Model. Shinta P. UML Actor.
E N D
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 (e.g., by exchanging signals and data), a human user of the designed system, some other system or hardware using services of 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
Relationships Between Actors • Generalization between actors is rendered as a solid directed line with a large arrowhead (same as for generalization between classes).
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.
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.)
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.
Use cases visually located inside the system boundaries are use cases applicable to the subject (but not necessarily owned by 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.
Use Case Include The 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.
How to Draw UML Use Case Diagram • Define Subject • Define Actors • Define Use Case
Home Heating Use-Cases Use case:Power Up Actors:Home Owner (initiator) Type: Primary and essential Description:The Home Owner turns the power on. Each room is temperature checked. If a room is below the the desired temperature the valve for the room is opened, the water pump started. If the water temp falls below threshold, the fuel valve is opened, and the burner ignited. If the temperature in all rooms is above the desired temperature, no actions are taken. Cross Ref.: Requirements XX, YY, and ZZ Use-Cases: None 05-Use-Cases
Modified Home Heating Home Heating Temp. High Power Up «includes» «includes» Power Down Adjust Temp «includes» Home Owner «includes» Change Temp. Temp. Low MH 05-Use-Cases
Modified:Home Heating Use-Cases * Use case:Power Up Actors: Home Owner (initiator) Type: Primary and essential Description:The Home Owner turns the power on. Perform Adjust Temp. If the temperature in all rooms is above the desired temperature, no actions are taken. Cross Ref.: Requirements XX, YY, and ZZ Use-Cases: Perform Adjust Temp 05-Use-Cases
Modified:Home Heating Use-Cases * Use case:Adjust Temp Actors: System (initiator) Type: Secondary and essential Description:Check the temperature in each room. For each room: Below target: Perform Temp Low Above target: Perform Temp High Cross Ref.: Requirements XX, YY, and ZZ Use-Cases: Temp Low, Temp High 05-Use-Cases
Modified:Home Heating Use-Cases * Use case:Temp Low Actors: System (initiator) Type: Secondary and essential Description: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 ZZ Use-Cases: None 05-Use-Cases
Proses Analisis Beorientasi Objek • Rational Unified Process (RUP)
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.