0% found this document useful (0 votes)
6 views

Class 14

The document discusses Unified Modeling Language (UML) which is a standard modeling language used for visualizing, specifying, constructing, and documenting software systems. It describes the different types of UML diagrams including class, object, use case, sequence, and deployment diagrams and how they are used to model different aspects of a system.

Uploaded by

vedidom615
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Class 14

The document discusses Unified Modeling Language (UML) which is a standard modeling language used for visualizing, specifying, constructing, and documenting software systems. It describes the different types of UML diagrams including class, object, use case, sequence, and deployment diagrams and how they are used to model different aspects of a system.

Uploaded by

vedidom615
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

Unified Modeling

Language (UML)

1
UML as A Standard
⚫ Adopted by Object Management
Group (OMG) in 1997
⚫ OMG is an association of industries
⚫ Promotes consensus notations and
techniques
⚫ Used outside software development
− Example car manufacturing

2
Why are UML Models Required?
⚫ A model is an abstraction mechanism:
− Capture only important aspects and
ignores the rest.
− Differentmodels result when different
aspects are ignored.
− Aneffective mechanism to handle
complexity.
⚫ UML is a graphical modelling tool
Easy to understand and construct
3

UML Diagrams
⚫ Nine diagrams are used to capture
different views of a system.
⚫ Views:
− Providedifferent perspectives of a
software system.
⚫ Diagrams can be refined to get
the actual implementation of a
system.
4
UML Diagrams
Behavioural View
Structural View - Sequence Diagram
- Class Diagram - Collaboration Diagram
- Object Diagram - State-chart Diagram
- Activity Diagram
User’s View
-Use Case
Diagram

Implementation View Environmental View


- Component Diagram - Deployment Diagram

Diagrams and views in UML


5
Are All Views Required for
Developing A Typical System?
⚫ Use case diagram, class diagram and one of the
interaction diagram for a simple system
⚫ State chart diagram required to be developed
when a class state changes
⚫ However, when states are only one or two, state
chart model becomes trivial
⚫ Deployment diagram in case of large number of
hardware components used to develop the
system

6
Use Case Model
⚫ Consists of set of “use cases” - Different
ways in which a system can be used by the
users
⚫ Corresponds to the high-level requirements
⚫ Represents transaction between the user and
the system
⚫ Defines external behavior without revealing
internal structure of system

7
Why Develop A
Use Case Diagram?
⚫ Serves as requirements specification
⚫ How are actor identifications useful
in software development:
− User identification helps in implementing
appropriate interfaces for different
categories of users
− Another use in preparing appropriate
documents (e.g. user’s manual).

8
Use Cases
⚫ Normally, use cases are independent of
each other
⚫ Implicit dependencies may exist
⚫ Example: In Library Automation System,
renew-book & reserve-book are
independent use cases.
− But in actual implementation of renew-book: a
check is made to see if any book has been
reserved using reserve-book.
9
Example Use Cases
− For library information system
⚫ issue-book
⚫ query-book
⚫ return-book
⚫ create-member
⚫ add-book, etc.

10
Representation of
Use Cases
− Represented by use case diagram
− A use case is represented by an ellipse
− System boundary is represented by a
rectangle
− Users are represented by stick person icons
(actor)
− Communication relationship between actor
and use case by a line
− External system by a stereotype
11
An Example Use Case Diagram

Play Move

Tic-tac-toe game
Player

Use case model

12
Factoring Use Cases
⚫ Two main reasons for factoring:
− Complex use cases need to be
factored into simpler use cases
− To represent common behavior across
different use cases
⚫ Three ways of factoring:
− Generalization
− Includes
− Extends 13
Factoring Use Cases Using
Generalization

Pay membership fee

Pay through credit card Pay through library pay card

14
15
Factoring Use Cases Using
Includes
<<include>> Common
Base use case
use case

Base use case Base use case

<<include>>
<<include>>
<<include>> <<include>>

Common Common Common


case case case

16
17
Factoring Use Cases Using
Extends

Base <<extends>> Common


use case use case

18
19
Extension Point

20
Hierarchical Organization of
Use Cases
use case 1 use case 3

use case 2

use case 3.1 use case 3.3


Subsystems
use case 3. 2

21
Use Case Packaging

Accounts

Print
Query balance
Balance sheet

Receive Make
grant payments

22
23
Class Diagram
⚫ Describes static structure of a
system
⚫ Main constituents are classes and
their relationships:
− Generalization
− Aggregation
− Association
− Various kinds of dependencies
24
Class Diagram
⚫ Entities with common features, i.e.
attributes and operations
⚫ Classes are represented as solid outline
rectangle with compartments
⚫ Compartments for name, attributes, and
operations.
⚫ Attribute and operation compartments are
optional depending on the purpose of a
diagram.
25
Example Class Diagram

LibraryMember LibraryMember LibraryMember


Member Name issueBook( );
Membership Number
findPendingBooks( );
Address
findOverdueBooks( );
Phone Number
returnBook( );
E-Mail Address
Membership Admission Date findMembershipDetails( );
Membership Expiry Date
Books Issued

issueBook( );
findPendingBooks( );
findOverdueBooks( );
returnBook( );
findMembershipDetails( );

Different representations of the LibraryMember class


26
Object Diagram

LibraryMember LibraryMember LibraryMember

Mritunjay Mritunjay
B10028 B10028
C-108, Laksmikant Hall C-108, Laksmikant Hall
1119 1119
Mrituj@cse Mrituj@cse
25-02-04 25-02-04
25-03-06 25-03-06
NIL NIL

IssueBook( );
findPendingBooks( );
findOverdueBooks( );
returnBook( );
findMembershipDetails( );

Different representations of the LibraryMember object


27
An example of Class Diagram

28
Thank You

29

You might also like