0
18kviews
Consider the use case diagram of a Course Registration System and explain extend, include and generalize relations between use cases.

Mumbai University > Computer Engineering > Sem 5 > SOOAD

Marks: 10M

Year: Dec 2014, May 2015

1 Answer
0
226views

Use case diagram of a Course Registration System:

enter image description here

Include:

  • Use case include is a directed relationship between two use cases which is used to show that behavior of the included use case (the addition) is inserted into the behavior of the including (the base) use case.
  • They 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.
  • A large use case could have some behaviors which might be detached into distinct smaller use cases to be included back into the base use case using the UML include relationship. The purpose of this action is modularization of behaviors, making them more manageable.

enter image description here

Use case B is extracted from larger use case A into a separate use case.

enter image description here

Use cases B and C are extracted from larger use case A into separate use cases.

  • When two or more use cases have some common behavior, this common part could be extracted into a separate use case to be included back by the use cases with the UML include relationship.

enter image description here

Use case C is extracted from use cases A and B to be reused by both use cases using UML include relationship.

  • Execution of the included use case is analogous to a subroutine call or macro command in programming. All of the behavior of the included use case is executed at a single location in the including use case before execution of the including use case is resumed.
  • Including use case depends on the addition of the included use case, which is required and not optional. It means that including use case is not complete by itself, and so it would make sense to refer to the including use cases as 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. The arrow is labeled with the keyword «include».

enter image description here

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.
  • Extended use case is meaningful on its own, it is independent of the extending use case. Extending use case typically defines optional behavior that is not necessarily meaningful by itself. The extend relationship is owned by the extending use case. The same extending use case can extend more than one use case, and extending use case may itself be extended.
  • The extension takes place at one or more extension points defined in the extended use case.
  • Extend relationship is shown as a dashed line with an open arrowhead directed from the extending use case to the extended (base) use case. The arrow is labeled with the keyword «extend».

enter image description here

  • Registration use case is complete and meaningful on its own. It could be extended with optional Get Help On Registration use case.

Generalization:

  • Base use case could be abstract use case (incomplete) or concrete (complete)
  • Specialized use case is required, not optional,
  • No explicit location to use specialization.
  • No explicit condition to use specialization.

enter image description here

Please log in to add an answer.