Include relationship use case example atm

Output of the Requirements Capture Process

include relationship use case example atm

A use case diagram consists of the system, the related use cases and actors and The time to use the include>> relationship is after you have completed the The figure below shows an ATM use case diagram example, which is quite a. An example of UML use case diagrams for a bank ATM - Customer actor uses case is required for every ATM transaction so we show it as include relationship. the basics of use case diagrams; how to draw a use case diagram. use case specification Extend- relationship between two use cases, the child use case adds to the existing . Sample UC specification- user validation in ATM machines.

See discussion of the definition of abstract use cases. Include relationship between use cases is shown by a dashed arrow with an open arrowhead from the including base use case to the included common part use case.

include relationship use case example atm

Checkout use case includes several use cases - Scan Item, Calculate Total and Tax, and Payment Large and complex Checkout use case has several use cases extracted, each smaller use case describing some logical unit of behavior.

Note, that including Checkout use case becomes incomplete by itself and requires included use cases to be complete. Use Case Relationships Compared This site received many requests related to which use case relationship should be used in which situation. I combined several key points from UML 2. Also, take a look at related discussion in the next paragraph.

include relationship use case example atm

You may even have multiple include-relationships between the same inclusion use case and base use case, provided the inclusion is inserted at different locations of the base use case. The include-relationship defines what the location is.

All additions may be nested, which means that an inclusion use case may serve as the base use case for another inclusion.

Use Cases for Example ATM System

Since the inclusion use case is abstract, it does not need to have an actor associated with it. A communication-association to an actor is only needed if the behavior in the inclusion explicitly involves interaction with an actor. Executing the Inclusion The behavior of the inclusion is inserted in one location in the base use case.

When a use-case instance following the description of a base use case reaches a location in the base use case from which include-relationship is defined, it will follow the description of the inclusion use case instead. Once the inclusion is performed, the use-case instance will resume where it left off in the base use case.

A use-case instance following the description of a base use case including its inclusion. The include-relationship is not conditional: If you want to express a condition, you need to do that as part of the base use case. If the use-case instance never reaches the location for which the include-relationship is defined, it will not be executed.

Use-case instance 1 reaches the location in the base use case for which the include-relationship is defined, and the inclusion is performed. Basic use case diagram for an ATM system The following sections show how the basic use case diagram can be extended to show additional information about the system being designed. Active and Passive Actors Active actors initiate interaction with the system.

This can be shown by placing an arrow on the association from the actor pointing toward the use case. In the ATM example, the customer is an active actor. Interaction with passive actors is initiated by the system. This can be shown by placing an arrow on the association from the use case pointing toward the actor. In the ATM example, the central computer is a passive actor. This is a good example where the arrow helps, since it allows us to distinguish an event driven system the ATM initiates interaction with the central computer from a polling system the central computer interrogates the ATM from time to time.

Where an actor may be either active or passive, depending on circumstances, the arrow may be omitted.

Use Case Diagram Tutorial

In the ATM example the bank engineer fits into this category. Normally he is active, turning up on a regular cycle to service the machine. However if the ATM detects a fault, it may summon the engineer to fix it. The use of arrows on associations is referred to as the navigation of the association.

  • UML Use Case Include

We shall see this used elsewhere in UML later on. Use case diagram for an ATM system showing navigation. Multiplicity It can be useful to show the multiplicity of associations between actors and use cases. By this we mean how many instances of an actor interact with how many instances of the use case.

include relationship use case example atm

By default we assume one instance of an actor interacts with one instance of a use case. In other cases we can label the multiplicity of one end of the association, either with a number to indicate how many instances are involved, or with a range separated by two periods. So we place the label There is no need for a label at the other end, since the default is one.

A local bank will have up to three officials authorized to unload and load ATM machines. So at the actor end of the relationship with the use case Maintain ATM, we place the label They may be dealing with any number of ATM machines, so at the other end we place the label There may be any number of customers and there may be any number of ATM systems they could use.

So at each end of the association we place the label Use case diagram for an ATM system showing multiplicity.

Use Case Diagram Tutorial

Multiplicity can clutter a diagram, and is often not shown, except where it is critical to understanding. In the ATM example we would only choose to show Hierarchies of Use Cases In our ATM example so far we have just three use cases to describe all the behavior of the system.

While use cases should always describe a significant chunk of system behavior, if they are too general they can be difficult to describe. The main use case could be specified by including the behavior of the subsidiary use cases where needed. In this case the two actors involved in the main use case are really only involved in one or other of the two subsidiary use cases and this can be shown on the diagram.

Use case diagram for an ATM system showing include relationships. Include relationships are fine for breaking down the use case behaviors in to hierarchies. However we may also want to show a use case that is an extension to an existing use case to cater for a particular circumstance.

We also want to cover the special case of an unscheduled repair caused by the ATM detecting an internal fault.

include relationship use case example atm

This is shown in UML by the extend relationship. In the main use case, we specify a name for a location in the description, where an extension to the behavior could be attached. The name and location are shown in a separate compartment within the use case oval. Alongside the extend relationship, we specify the condition under which that behavior will be attached.

UML Use Case Diagram Tutorial

The diagram is now getting rather complex, and so we have split it into two, one for the maintenance side of things, the other for customer usage and audit. Use case diagram for an ATM system showing an extend relationship. Use cases may be linked together in one other way.

include relationship use case example atm

One use case may be a generalization of a subsidiary use case or alternatively the subsidiary is a specialization of the main use case. This is very like the extends relationship, but without the constraint of specific extension points at which the main use case may be extended, and with no condition on when the subsidiary use case may be used.

Generalization is shown on a use case diagram by an arrow with solid line and solid white head from the subsidiary to the main use case.

This may be useful when a subsidiary use case specializes the behavior of the main use case at a large number of positions and under a wide range of circumstances. However the lack of any restriction makes generalization very hard to specify precisely.