Adobe Systems PB007 Software Engineering I — Use Case Diagram II, Textual Specifications 1 Use Case Diagram II, Textual Specifications PB007 Software Engineering I Lukáš Daubner daubner@mail.muni.cz A picture containing text Description automatically generated Adobe Systems PB007 Software Engineering I — Use Case Diagram II, Textual Specifications 2 Use Case Diagram – There is more… ̶Diagram is more expressive ̶Inheritance (generalization) of actors ̶ ̶Inheritance (generalization) of use cases ̶ ̶“Shared” use case – Include ̶ ̶“Modular” use case – Extend ̶ ̶ A picture containing text Description automatically generated Adobe Systems PB007 Software Engineering I — Use Case Diagram II, Textual Specifications 3 Actors Generalization ̶Relationship between the more general and specialized actors ̶ ̶For simplifying the diagram ̶ ̶General actors are often abstract, i.e., not a real role ̶ ̶A descending actor inherits all roles and parent link. Every time it is expected the use of a parent actor, we can use one of the descendants Adobe Systems PB007 Software Engineering I — Use Case Diagram II, Textual Specifications 4 Actors Generalization – Example Diagram Description automatically generated Diagram Description automatically generated Adobe Systems PB007 Software Engineering I — Use Case Diagram II, Textual Specifications 5 Use Case Generalization ̶relationship between the general and specialized use cases ̶ ̶A specialized use cases inherits the properties, and add new features by overloading (changing) the inherited properties ̶It cannot overload the parents’ extension points ̶ ̶The textual specification should reflect those changes ̶ ̶Parental use cases can be abstract (recommended) ̶Either no specification or incomplete specification of the flow of events Adobe Systems PB007 Software Engineering I — Use Case Diagram II, Textual Specifications 6 Use Case Generalization – Example Adobe Systems PB007 Software Engineering I — Use Case Diagram II, Textual Specifications 7 Include ̶Specialized type of relationship ̶ ̶Allows you to allocate repetitive steps in several use cases in separate use case ̶ ̶The basic use case is incomplete without all the embedded use cases ̶ ̶ ̶ Adobe Systems PB007 Software Engineering I — Use Case Diagram II, Textual Specifications 8 Include Icon Description automatically generated Adobe Systems PB007 Software Engineering I — Use Case Diagram II, Textual Specifications 9 Include Adobe Systems PB007 Software Engineering I — Use Case Diagram II, Textual Specifications 10 Extend ̶Specialized type of relationship ̶ ̶Allows insertion of new behaviour into base use case ̶The extension is transparent for the use case – the base do not know about extensions ̶ ̶It is inserted at specifically defined points (extension points) ̶ ̶The extending use cases hooks on the extension points ̶It is possible to define conditions or hook multiple use cases on one extension point Adobe Systems PB007 Software Engineering I — Use Case Diagram II, Textual Specifications 11 Extend Adobe Systems PB007 Software Engineering I — Use Case Diagram II, Textual Specifications 12 Extend Adobe Systems PB007 Software Engineering I — Use Case Diagram II, Textual Specifications 13 Textual Specification of Use Cases ̶Detailed and structured description of a use case ̶ ̶It should include: ̶Name and ID ̶Brief description ̶Primary and secondary actors ̶Input and output conditions ̶Main flow of events ̶Alternative flow of events ̶ Adobe Systems PB007 Software Engineering I — Use Case Diagram II, Textual Specifications 14 Flow of Events – Main Flow ̶Sequence of steps of interaction with the system in the ideal case ̶(free from errors, interruptions, …) ̶Written as: ̶ ̶Begins with some action from primary actor ̶Recommended form is: 1. The use case begins when ̶ ̶You can use keywords IF, FOR (FOREACH), WHILE Adobe Systems PB007 Software Engineering I — Use Case Diagram II, Textual Specifications 15 Flow of Events – Example ̶1. Use case starts when Customer opens rental form ̶2. INCLUDE(Find Available Zeppelins) ̶3. System displays zeppelins available for rental ̶4. Customer chooses zeppelin to rent ̶5. WHILE form is not valid ̶5.1 Customer fills personal information ̶6. Customer submits the form ̶EXTENSION POINT(NotifyRental) ̶7. System saves rental request Adobe Systems PB007 Software Engineering I — Use Case Diagram II, Textual Specifications 16 Flow of Events – Alternative Flow ̶The same formatting rules as for the main flow ̶ ̶Represents deviations from the main flow due to errors or interruptions ̶ ̶It can also be used to capture more complex branching, such as situations that are not exactly known if and when they will occur Adobe Systems PB007 Software Engineering I — Use Case Diagram II, Textual Specifications 17 Work, work In this seminar… ̶Visual Paradigm demo ̶ ̶Team work on project ̶Use case diagram II Adobe Systems PB007 Software Engineering I — Use Case Diagram II, Textual Specifications 18 You gotta do what you gotta do Task for this week ̶Revise the use case diagram and think using the new constructs ̶At least one include/extend should be applicable ̶ ̶(Wire a brief description for all use cases) ̶~2 sentences ̶ ̶Choose 3 use cases and create full textual specification ̶Choose the more complex ones to make more sense ̶Mark them on diagram (colour) ̶