Unified Modeling Language

Download Report

Transcript Unified Modeling Language

University of Suleimani
Faculty of Science and Education Sciences
School of Science
Computer Department
Lecturer: Rebaz Nawzad



Understanding Unified Modelling Language
Identifying Model.
Learning Use case modeling.


The language of the designer.
Representations of the system to-be-built or
as-built.
Modeling provides:
 Visualization
 Complexity management
 Clear communication
What is model in UML?



Is a visual language for specifying,
constructing, and documenting the artifacts
of systems.
Complex software designs that are hard to
describe textually can be simply explained
through diagrams using UML.
It provides the development community with
a stable and common design language that
could be used to develop and build computer
applications.
Define: UML

UML provides a set of diagrams that models
the structural and behavioral attitude of a
system and it can be used with all processes
throughout the development lifecycle and
across different implementation technologies.
Define: UML




UML is an open standard that was released by
Object Management Group (OMG). It is
basically an integration of the three objectoriented modeling approaches, namely:
Jim Rumbaugh’s object-modeling technique
(OMT),
Ivar Jacobson’s object-oriented software
engineering (OOSE) method and
Grady Booch’s Booch method.
How UML started, and what is
UML?

The reason for UML becoming a standard
modeling language is that it is programminglanguage independent.
How UML started, and what is
UML?
UML diagrams represent two different views
of a system
model:
Define:
static view of UML,
Dynamic View of UML.


Static (or structural) view: illustrates the static
structure of the system using objects,
attributes, operations and relationships.
Dynamic (or behavioral) view: illustrates the
dynamic behavior of the system by showing
collaborations among objects and changes to
the internal states of objects.
What views dose UML represents?

-
What are the duties of Use Case
Basis for a user-oriented
approach to system
Modelling?
development
Identify the users of the system(actors)
Identify the tasks they must undertake with
the system (use cases)
Relate users & tasks (relationship)
Help identify boundary
Capture system functionality as seen by users
Define: Use Case Modelling
ATM (cash machine) UML example.
From eclipse.org


-
To find actors, observe direct users of the
systems – could be users or systems
Actors could be:
Principal
Secondary (external hardware, other systems)

-
Things actors do with the system
A task which an actor needs to perform with
the help of a system
Describe the behavior of the system from a
user’s perspective
Define: use cases.
Use case
What is use case in UML?
To find use cases:
 Start with the list of actors and consider:
- What they need from the system
- Any other interactions they expect to interact
with the system (i.e. which use cases they
might take part in for someone’s else benefit)
How to find use case in UML?

Draw a use case diagram of a library system
Draw a use case diagram of a
library system
Draw a use case diagram of a
library system
which provide opportunities for
- Optional parts
- Alternative complex cases
- Separate sub-cases
What are extensions in UML?
Use <<include>>
- When having a complementary use case.
- To show common functionality between use
cases
Sometimes “<<uses>>” is used instead of
<<include>>

What is include in UML?
Scan item
Checkout
<<include>>
Calculate
Total and
Tax
Payment
What are example for Include in
UML?
From uml-diagrams.org


When a use case fails
A part of a use case that is optional system
behavior
What is extend in UML and provide
an example for your description?
Refuse
loan
BookBorrower
Borrow copy
of a book
http://upload.wikimedia.org/wikipedia/commons/1/1d/Use_case_restaurant_model.svg
Writing a specification for the use case
– Preconditions: the system state before the
case begin (i.e., facts, things that must be
true)
– Flow of events; the steps in the use case (i.e.
actions…)
– Post conditions: the system state after the
case has been completed

How to detail a use case, please
provide and example?
Borrow a copy of book
• Precondition
1. the BookBorrower is a member of the library
2. the BookBorrower has not got more than the
permitted number of books on loan
• Flow of events
1. the use case starts when the BookBorrower
attempts to borrow a book
2. the librarian checks it is ok to borrow a book
3. If …… (indicate an alternative path of action)
• Post-conditions
1. the system has updated the number of books
the BookBorrower has on loan

Assume you have an online flight booking
system, select one of the possible use cases
and create complete specification for it.


Each time an actor interacts with a system,
the triggered use cases instantiate a scenario
Each case corresponds to a specific path
through a use case with no branching

Write two possible scenarios when a user
borrows a book from the library.
Scenario 1
Book Borrower Alice Borrows the library’s only
copy of using UML, when she has no other
book on loan. The system is updated
accordingly.
 Scenario 2
Book Borrower Ann tries to borrow the library’s
second copy of Software Engineering, but is
refused because she has six books out on
loan, which is her maximum allowance.

Important



This presentation has used slides and
information from the following web sources,
including:
http://www01.ibm.com/software/rational/uml/
http://www.cs.bham.ac.uk/~rzb/CBSUML2.pdf