Introduction to Software Engineering

 (Introduction to UML and Use Case Diagram)



Objective

·         Study the benefits of visual modeling.
·         Learn use case diagrams:
o   discovering actors
o   discovering use cases.
·         Practice use cases diagrams

Outline

Visual modeling.
Introduction to UML.
Introduction to visual modeling with UML.
Use case diagrams: discovering actors and use cases.

Background

Visual Modeling is a way of thinking about problems using models organized around real-world ideas. Models are useful for understanding problems, communicating with everyone involved with the project (customers, domain experts, analysts, designers, etc.), modeling enterprises, preparing documentation, and designing programs and databases.

Visual Modeling

·         Capture the structure and behavior of architectures and components.
·         Show how the elements of the system fit together.
·         Hide or expose details appropriate for the task.
·         Maintain consistency between a design and its implementation.
·         Promote unambiguous communication.

What is UML?

The UML is the standard language for visualizing, specifying, constructing and documenting the artifacts of a software-intensive system. UML can be used with all processes throughout the development life cycle and across different implementation technologies.





Putting UML into Work: Use Case Diagram

The behavior of the system under development (i.e. what functionality must be provided by the system) is documented in a use case model that illustrates system's intended functions (use cases), its surroundings (actors), and relationships between the use cases and actors (use case diagrams).

Actors

·         Are NOT part of the system – they represent anyone or anything that must interact with the system.
·         Only input information to the system.
·         Only receive information from the system.
·         Both input to and receive information from the system.
·         Represented in UML as a stick man.
Actors



Use Case

A sequence of transactions performed by a system that yields a measurable result of values for a particular actor.
A use case typically represents a major piece of functionality that is complete from beginning to end. A use case must deliver something of value to an actor.

UseCase

Use Case Relationships

·         Between actor and use case.
·         Association / Communication.
·         Arrow can be in either or both directions; arrow indicates who initiates communication.
·         Between use cases (generalization):
o   Uses
§  Where multiple use cases share pieces of same functionality.
o   Extends
§  Optional behavior.
§  Behavior only runs under certain conditions (such as alarm).
§  Several different flows run based on the user’s selection.

Exercise

We are after a system that controls a recycling machine for returnable bottles and cans. The machine will allow a customer to return bottles or cans on the same occasion.
When the customer returns an item, the system will check what type has been returned. The system will register how many items each customer returns and, when the customer asks for a receipt, the system will print out what he deposited, the value of the returned items and the total return sum that will be paid to the customer.
The system is also be used by an operator. The operator wants to know how many items of each type have been returned during the day. At the end of the day, the operator asks for a printout of the total number of items that have been deposited in the machine on that particular day. The operator should also be able to change information in the system, such as the deposit values of the items. If something is amiss, for example if a can gets stuck or if the receipt roll is finished, the operator will be called by a special alarm signal.

After reading the above problem statement, find
1.      Actors
2.      Use cases with each actor
3.      Find extended or uses use cases (if applicable)
4.      Draw the main use case diagram

You should use these techniques to draw use case diagrams for your semester project

Post a Comment

Previous Post Next Post