SlideShare a Scribd company logo
1 of 42
UML
CSE 470 : Software Engineering
• Unified Modeling Language
• UML is a modeling language to
express and design documents,
software
– Particularly useful for OO design
– Not a process
– Independent of implementation language
What is UML?
Types of UML Diagrams
1. Use Case Diagram: capture requirements.
Clarify exactly what the system is supposed to do
2. Class Diagram: static relationships between classes.
Describe the types of objects in the system and various
kinds of static relationship that exist among them.
3. Sequence Diagram: Displays the time sequence of
the objects participating in the interaction.
Use Case Diagram
Use Case Diagrams:
A series of actions performed by user
Use case diagrams represent external behavior
Use case diagrams are useful as an index into the use
cases
Actor
An actor models an external entity which
communicates with the system:
 User
 External system
 Physical environment
An actor has a unique name and an optional
description.
Examples:
 Passenger: A person in the train
 GPS satellite: Provides the system with GPS coordinates
Passenger
Actor
Primary actor:
interact to achieve required system function and
derive the intended
Secondary actor:
support the system so that primary actors can do
their work.
It is important to note that an actor and an end user
are not necessarily the same thing.
Use case
A use case represents a class of functionality provided
by the system as an event flow.
A use case consists of:
Unique name
Participating actors
Entry conditions
Flow of events
Exit conditions
PurchaseTicket
Use Case Diagrams
Library System
Borrow
Order Title
Fine Remittance
Client
Employee
Supervisor
• A generalized description of how a system will be used.  
• Provides an overview of the intended functionality of the system
Boundary
Actor
Use Case
Object oriented approach?
Use Case Diagram(core relationship)
Include: a dotted line labeled <<include>> beginning at base use case 
and ending with an arrows pointing to the include use case. An “Include” 
relationship is used to indicate that a particular Use Case must include 
another use case to perform its function.                      
                              <<include>>
or in MS Visio
A Use Case may be included by one or more Use Cases, so it reduces 
duplication of functionality. 
Example:   the <list orders> Use Case may be included 
every time when the <modify order> Use Case is run. 
Use Case Diagram (core relationship)
Extend: a dotted line labeled <<extend>> with an arrow toward the
base case. The extending use case may add behavior to the base use case.
The base class declares “extension points”.
<<extend>>
Used when exceptional circumstances are encountered. For example, the
<get approval> Use Case may optionally extend the regular <modify
order> Use Case.
Note: other expressions. For example, in MS Visio
Example
Problem:
Develop a system where a patient can make an
appointment, cancel his appointment and pay bill to
the corresponding authority
Example
At first, try to define your actors
List the set of user cases
Connect each user cases to an actor
Show the relation between each user cases
An approach of Jacobson
 Who is the primary actor, the secondary actor(s)?
 What are the actor’s goals?
 What preconditions should exist before the story begins?
 What main tasks or functions are performed by the actor?
 What exceptions might be considered as the story is described?
 What variations in the actor’s interaction are possible?
 What system information will the actor acquire, produce, or change?
 Will the actor have to inform the system about changes in the external
environment?
 What information does the actor desire from the system?
 Does the actor wish to be informed about unexpected changes?
Practice yourself
Solution
Use Case Diagrams(cont.)
•Pay Bill is a parent use case and Bill Insurance is the child use
case. (generalization)
•Both Make Appointment and Request Medication include
Check Patient Record as a subtask.(include)
•The extension point is written inside the base case
Pay bill; the extending class Defer payment adds the behavior
of this extension point. (extend)
Use Case Diagram: Example
Name: Purchase ticket
Participating actor: Passenger
Entry condition:
• Passenger standing in front of
ticket distributor.
• Passenger has sufficient
money to purchase ticket.
Exit condition:
• Passenger has ticket.
Event flow:
1. Passenger selects the number
of zones to be traveled.
2. Distributor displays the amount
due.
3. Passenger inserts money, of at
least the amount due.
4. Distributor returns change.
5. Distributor issues ticket.
Anything missing?
Exceptional cases!
Use Cases are useful to…
Determining requirements
 New use cases often generate new requirements as the
system is analyzed and the design takes shape.
Communicating with clients
 Their notational simplicity makes use case diagrams a
good way for developers to communicate with clients.
Generating test cases
 The collection of scenarios for a use case may suggest a
suite of test cases for those scenarios.
Class Diagram
A class is a description of a set of objects
Each class is represented by a rectangle subdivided
into three compartments
 Name
 Attributes
 Operations
Class Diagram
Notation: Classes
Window
origin
size
open()
close()
move()
display()
name
attributes
operations
The "Hello, World" Example
import java.awt.Graphics;
class HelloWorld extends java.applet.Applet {
public void paint (Graphics g) {
g.drawString ("Hello, World!", 10, 10);
}
}
Example from: BJR
HelloWorld
paint()
class
name
operations
The "Hello, World" Example
HelloWorld
paint()
g.drawString ("HelloWorld", 0,
10)"
class
name
operations
annotation
The "Hello, World" Example
UML Class Notation
A class is a rectangle divided into three parts
 Class name
 Class attributes (i.e. data members, variables)
 Class operations (i.e. methods)
Modifiers
 Private: -
 Public: +
 Protected: #
 Static: Underlined
Abstract class: Name in italics
UML Class Notation
UML Class Notation
Lines or arrows between classes indicate relationships
 Association
 A relationship between instances of two classes, where one class must
know about the other to do its work, e.g. client communicates to server
 indicated by a straight line or arrow
 Aggregation
 An association where one class belongs to a collection, e.g. instructor part
of Faculty
 Indicated by an empty diamond on the side of the collection
 Composition
 Strong form of Aggregation
 Lifetime control; components cannot exist without the aggregate
 Indicated by a solid diamond on the side of the collection
 Inheritance
 An inheritance link indicating one class a superclass relationship, e.g.
bird is part of mammal
 Indicated by triangle pointing to superclass
Binary Association
myB.service(); myA.doSomething()
;
Binary Association: Both entities “Know About” each other
Optionally, may create an Associate Class
Unary Association
A knows about B, but B knows nothing about A
Arrow points in direction
of the dependency
myB.service();
Aggregation
Aggregation is an association with a “collection-member” relationship
void
doSomething()
aModule.service();
Hollow diamond on
the Collection side
No sole ownership implied
Composition
Composition is Aggregation with:
Lifetime Control (owner controls construction, destruction)
Part object may belong to only one whole object
Filled diamond on side of
the Collection
members[0] =
new
Employee();
…
delete
members[0];
Inheritance
Standard concept of inheritance
class B() extends
A
…
Base Class
Derived Class
UML Multiplicities
Multiplicities Meaning
0..1
zero or one instance. The notation n . . m
indicates n to m instances.
0..* or *
no limit on the number of instances
(including none).
1 exactly one instance
1..* at least one instance
Links on associations to specify more details about the relationship
UML Class Example
Sequence / Activity Diagram
Activity diagram
Activity diagram supplements the use case by
providing a graphical representation of the flow of
interaction within a specific scenario
Similar to the flowchart
Activity diagram: notation
Rounded rectangles to imply a specific system
function,
Arrows to represent flow through the system,
Decision diamonds to depict a branching decision
Solid horizontal lines to indicate that parallel
activities are occurring
Activity diagram for
Access camera
surveillance via the
Internet—display
camera views function
Thank you
References
Cornell University, USA
http://www.cs.cornell.edu/courses/cs501/2000fa/slides.html
Shiyuan Jin, Fall 2006 (Student in UCR)Shiyuan Jin, Fall 2006 (Student in UCR)
Roger s. pressman, Software Engineering a
practitioners approach, 7th
ed

More Related Content

What's hot

Ajp notes-chapter-01
Ajp notes-chapter-01Ajp notes-chapter-01
Ajp notes-chapter-01JONDHLEPOLY
 
Uml Interview Questions
Uml Interview QuestionsUml Interview Questions
Uml Interview QuestionsRaj Chanchal
 
Cs 1023 lec 10 uml (week 3)
Cs 1023 lec 10 uml (week 3)Cs 1023 lec 10 uml (week 3)
Cs 1023 lec 10 uml (week 3)stanbridge
 
Advanced c#
Advanced c#Advanced c#
Advanced c#saranuru
 
Interfaces and abstract classes
Interfaces and abstract classesInterfaces and abstract classes
Interfaces and abstract classesAKANSH SINGHAL
 
C0 review core java1
C0 review core java1C0 review core java1
C0 review core java1tam53pm1
 

What's hot (10)

Sequence diagrams in UML
Sequence diagrams in UMLSequence diagrams in UML
Sequence diagrams in UML
 
Ajp notes-chapter-01
Ajp notes-chapter-01Ajp notes-chapter-01
Ajp notes-chapter-01
 
Uml Interview Questions
Uml Interview QuestionsUml Interview Questions
Uml Interview Questions
 
Cs 1023 lec 10 uml (week 3)
Cs 1023 lec 10 uml (week 3)Cs 1023 lec 10 uml (week 3)
Cs 1023 lec 10 uml (week 3)
 
Basic of java 2
Basic of java  2Basic of java  2
Basic of java 2
 
Advanced c#
Advanced c#Advanced c#
Advanced c#
 
Interfaces and abstract classes
Interfaces and abstract classesInterfaces and abstract classes
Interfaces and abstract classes
 
31 uml
31 uml31 uml
31 uml
 
Umldiagram
UmldiagramUmldiagram
Umldiagram
 
C0 review core java1
C0 review core java1C0 review core java1
C0 review core java1
 

Viewers also liked

Surveillance System (Minimum Vertex Cover Problem)
Surveillance System (Minimum Vertex Cover Problem) Surveillance System (Minimum Vertex Cover Problem)
Surveillance System (Minimum Vertex Cover Problem) Saksham Saxena
 
Home appliances control system
Home appliances control systemHome appliances control system
Home appliances control systemSundas Kayani
 
CHAPTER 6 REQUIREMENTS MODELING: SCENARIO based Model , Class based moddel
CHAPTER 6 REQUIREMENTS MODELING: SCENARIO based Model , Class based moddelCHAPTER 6 REQUIREMENTS MODELING: SCENARIO based Model , Class based moddel
CHAPTER 6 REQUIREMENTS MODELING: SCENARIO based Model , Class based moddelmohamed khalaf alla mohamedain
 
Study for big data analysis design model
Study for big data analysis design modelStudy for big data analysis design model
Study for big data analysis design modelJoon ho Park
 
RPL_UML_toko online
RPL_UML_toko onlineRPL_UML_toko online
RPL_UML_toko onlinefaqih_id
 
Home automation using android phones-Project 2nd phase ppt
Home automation using android phones-Project 2nd phase pptHome automation using android phones-Project 2nd phase ppt
Home automation using android phones-Project 2nd phase pptthrishma reddy
 
Pembuatan uml pada toko belanja online
Pembuatan uml pada toko belanja onlinePembuatan uml pada toko belanja online
Pembuatan uml pada toko belanja onlineandiseprianto
 
Unit 3 3 architectural design
Unit 3 3 architectural designUnit 3 3 architectural design
Unit 3 3 architectural designHiren Selani
 
Ch6-Software Engineering 9
Ch6-Software Engineering 9Ch6-Software Engineering 9
Ch6-Software Engineering 9Ian Sommerville
 
Lecture 2 Software Engineering and Design Object Oriented Programming, Design...
Lecture 2 Software Engineering and Design Object Oriented Programming, Design...Lecture 2 Software Engineering and Design Object Oriented Programming, Design...
Lecture 2 Software Engineering and Design Object Oriented Programming, Design...op205
 
객체지향 개념 (쫌 아는체 하기)
객체지향 개념 (쫌 아는체 하기)객체지향 개념 (쫌 아는체 하기)
객체지향 개념 (쫌 아는체 하기)Seung-June Lee
 
Codes and Conventions of Documentary Adverts
Codes and Conventions of Documentary AdvertsCodes and Conventions of Documentary Adverts
Codes and Conventions of Documentary Advertsdb04803167
 
La Gestión de imagen como factor clave del posicionamiento
La Gestión de imagen como factor clave del posicionamientoLa Gestión de imagen como factor clave del posicionamiento
La Gestión de imagen como factor clave del posicionamientoMerecedessalas
 

Viewers also liked (20)

Slides chapter 8
Slides chapter 8Slides chapter 8
Slides chapter 8
 
Surveillance System (Minimum Vertex Cover Problem)
Surveillance System (Minimum Vertex Cover Problem) Surveillance System (Minimum Vertex Cover Problem)
Surveillance System (Minimum Vertex Cover Problem)
 
Home appliances control system
Home appliances control systemHome appliances control system
Home appliances control system
 
CHAPTER 6 REQUIREMENTS MODELING: SCENARIO based Model , Class based moddel
CHAPTER 6 REQUIREMENTS MODELING: SCENARIO based Model , Class based moddelCHAPTER 6 REQUIREMENTS MODELING: SCENARIO based Model , Class based moddel
CHAPTER 6 REQUIREMENTS MODELING: SCENARIO based Model , Class based moddel
 
Study for big data analysis design model
Study for big data analysis design modelStudy for big data analysis design model
Study for big data analysis design model
 
Use Case Diagram
Use Case DiagramUse Case Diagram
Use Case Diagram
 
RPL_UML_toko online
RPL_UML_toko onlineRPL_UML_toko online
RPL_UML_toko online
 
Slides chapter 9
Slides chapter 9Slides chapter 9
Slides chapter 9
 
Home automation using android phones-Project 2nd phase ppt
Home automation using android phones-Project 2nd phase pptHome automation using android phones-Project 2nd phase ppt
Home automation using android phones-Project 2nd phase ppt
 
Pembuatan uml pada toko belanja online
Pembuatan uml pada toko belanja onlinePembuatan uml pada toko belanja online
Pembuatan uml pada toko belanja online
 
05 architectural design
05 architectural design05 architectural design
05 architectural design
 
Unit 3 3 architectural design
Unit 3 3 architectural designUnit 3 3 architectural design
Unit 3 3 architectural design
 
Ch6-Software Engineering 9
Ch6-Software Engineering 9Ch6-Software Engineering 9
Ch6-Software Engineering 9
 
Lecture 2 Software Engineering and Design Object Oriented Programming, Design...
Lecture 2 Software Engineering and Design Object Oriented Programming, Design...Lecture 2 Software Engineering and Design Object Oriented Programming, Design...
Lecture 2 Software Engineering and Design Object Oriented Programming, Design...
 
객체지향 개념 (쫌 아는체 하기)
객체지향 개념 (쫌 아는체 하기)객체지향 개념 (쫌 아는체 하기)
객체지향 개념 (쫌 아는체 하기)
 
01 speeches stuchery
01 speeches   stuchery01 speeches   stuchery
01 speeches stuchery
 
Dibujos arte
Dibujos arteDibujos arte
Dibujos arte
 
Codes and Conventions of Documentary Adverts
Codes and Conventions of Documentary AdvertsCodes and Conventions of Documentary Adverts
Codes and Conventions of Documentary Adverts
 
La Gestión de imagen como factor clave del posicionamiento
La Gestión de imagen como factor clave del posicionamientoLa Gestión de imagen como factor clave del posicionamiento
La Gestión de imagen como factor clave del posicionamiento
 
Web semantica
 Web semantica Web semantica
Web semantica
 

Similar to 4. UML

Similar to 4. UML (20)

Uml lecture
Uml lectureUml lecture
Uml lecture
 
CASE Tools lab.ppt
CASE Tools lab.pptCASE Tools lab.ppt
CASE Tools lab.ppt
 
UML_Lecture.pptxnd bfdjjrnekdddkeeeenekejneje
UML_Lecture.pptxnd bfdjjrnekdddkeeeenekejnejeUML_Lecture.pptxnd bfdjjrnekdddkeeeenekejneje
UML_Lecture.pptxnd bfdjjrnekdddkeeeenekejneje
 
Intro Uml
Intro UmlIntro Uml
Intro Uml
 
Uml report
Uml reportUml report
Uml report
 
Basic Behavioral Modeling
Basic Behavioral ModelingBasic Behavioral Modeling
Basic Behavioral Modeling
 
UML- Unified Modeling Language
UML- Unified Modeling LanguageUML- Unified Modeling Language
UML- Unified Modeling Language
 
2 class use case
2 class use case2 class use case
2 class use case
 
uml.ppt
uml.pptuml.ppt
uml.ppt
 
Unit 3
Unit 3Unit 3
Unit 3
 
OOSE UNIT-2.pdf
OOSE UNIT-2.pdfOOSE UNIT-2.pdf
OOSE UNIT-2.pdf
 
UML.pptx
UML.pptxUML.pptx
UML.pptx
 
ASP.NET System design 2
ASP.NET System design 2ASP.NET System design 2
ASP.NET System design 2
 
Uml
UmlUml
Uml
 
Uml - An Overview
Uml - An OverviewUml - An Overview
Uml - An Overview
 
Introducing Uml And Development Process
Introducing Uml And Development ProcessIntroducing Uml And Development Process
Introducing Uml And Development Process
 
uml2-1214558329929112-8.ppt
uml2-1214558329929112-8.pptuml2-1214558329929112-8.ppt
uml2-1214558329929112-8.ppt
 
System Modelling.ppt
System Modelling.pptSystem Modelling.ppt
System Modelling.ppt
 
Object Oriented Design
Object Oriented DesignObject Oriented Design
Object Oriented Design
 
Object Oriented Design
Object Oriented DesignObject Oriented Design
Object Oriented Design
 

More from Ashis Kumar Chanda

More from Ashis Kumar Chanda (20)

Word 2 vector
Word 2 vectorWord 2 vector
Word 2 vector
 
Multi-class Image Classification using deep convolutional networks on extreme...
Multi-class Image Classification using deep convolutional networks on extreme...Multi-class Image Classification using deep convolutional networks on extreme...
Multi-class Image Classification using deep convolutional networks on extreme...
 
Full resolution image compression with recurrent neural networks
Full resolution image compression with  recurrent neural networksFull resolution image compression with  recurrent neural networks
Full resolution image compression with recurrent neural networks
 
Understanding Natural Language Queries over Relational Databases
Understanding Natural Language Queries over Relational DatabasesUnderstanding Natural Language Queries over Relational Databases
Understanding Natural Language Queries over Relational Databases
 
03. Agile Development
03. Agile Development03. Agile Development
03. Agile Development
 
Software Cost Estimation
Software Cost EstimationSoftware Cost Estimation
Software Cost Estimation
 
Risk Management
Risk ManagementRisk Management
Risk Management
 
Project Management
Project ManagementProject Management
Project Management
 
MVC
MVCMVC
MVC
 
Requirements engineering
Requirements engineeringRequirements engineering
Requirements engineering
 
2. Software process
2. Software process2. Software process
2. Software process
 
1. Introduction
1. Introduction1. Introduction
1. Introduction
 
Periodic pattern mining
Periodic pattern miningPeriodic pattern mining
Periodic pattern mining
 
FPPM algorithm
FPPM algorithmFPPM algorithm
FPPM algorithm
 
Secure software design
Secure software designSecure software design
Secure software design
 
Sequential logic circuit optimization
Sequential logic circuit optimizationSequential logic circuit optimization
Sequential logic circuit optimization
 
Introduction to CS
Introduction to CSIntroduction to CS
Introduction to CS
 
Iterative deepening search
Iterative deepening searchIterative deepening search
Iterative deepening search
 
CloudBus
CloudBusCloudBus
CloudBus
 
Linear Machine Decision Tree
Linear Machine Decision TreeLinear Machine Decision Tree
Linear Machine Decision Tree
 

Recently uploaded

Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 

Recently uploaded (20)

Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 

4. UML

  • 1. UML CSE 470 : Software Engineering
  • 2. • Unified Modeling Language • UML is a modeling language to express and design documents, software – Particularly useful for OO design – Not a process – Independent of implementation language What is UML?
  • 3. Types of UML Diagrams 1. Use Case Diagram: capture requirements. Clarify exactly what the system is supposed to do 2. Class Diagram: static relationships between classes. Describe the types of objects in the system and various kinds of static relationship that exist among them. 3. Sequence Diagram: Displays the time sequence of the objects participating in the interaction.
  • 5. Use Case Diagrams: A series of actions performed by user Use case diagrams represent external behavior Use case diagrams are useful as an index into the use cases
  • 6. Actor An actor models an external entity which communicates with the system:  User  External system  Physical environment An actor has a unique name and an optional description. Examples:  Passenger: A person in the train  GPS satellite: Provides the system with GPS coordinates Passenger
  • 7. Actor Primary actor: interact to achieve required system function and derive the intended Secondary actor: support the system so that primary actors can do their work. It is important to note that an actor and an end user are not necessarily the same thing.
  • 8. Use case A use case represents a class of functionality provided by the system as an event flow. A use case consists of: Unique name Participating actors Entry conditions Flow of events Exit conditions PurchaseTicket
  • 9. Use Case Diagrams Library System Borrow Order Title Fine Remittance Client Employee Supervisor • A generalized description of how a system will be used.   • Provides an overview of the intended functionality of the system Boundary Actor Use Case
  • 11. Use Case Diagram(core relationship) Include: a dotted line labeled <<include>> beginning at base use case  and ending with an arrows pointing to the include use case. An “Include”  relationship is used to indicate that a particular Use Case must include  another use case to perform its function.                                                     <<include>> or in MS Visio A Use Case may be included by one or more Use Cases, so it reduces  duplication of functionality.  Example:   the <list orders> Use Case may be included  every time when the <modify order> Use Case is run. 
  • 12. Use Case Diagram (core relationship) Extend: a dotted line labeled <<extend>> with an arrow toward the base case. The extending use case may add behavior to the base use case. The base class declares “extension points”. <<extend>> Used when exceptional circumstances are encountered. For example, the <get approval> Use Case may optionally extend the regular <modify order> Use Case. Note: other expressions. For example, in MS Visio
  • 13. Example Problem: Develop a system where a patient can make an appointment, cancel his appointment and pay bill to the corresponding authority
  • 14. Example At first, try to define your actors List the set of user cases Connect each user cases to an actor Show the relation between each user cases
  • 15. An approach of Jacobson  Who is the primary actor, the secondary actor(s)?  What are the actor’s goals?  What preconditions should exist before the story begins?  What main tasks or functions are performed by the actor?  What exceptions might be considered as the story is described?  What variations in the actor’s interaction are possible?  What system information will the actor acquire, produce, or change?  Will the actor have to inform the system about changes in the external environment?  What information does the actor desire from the system?  Does the actor wish to be informed about unexpected changes?
  • 18. Use Case Diagrams(cont.) •Pay Bill is a parent use case and Bill Insurance is the child use case. (generalization) •Both Make Appointment and Request Medication include Check Patient Record as a subtask.(include) •The extension point is written inside the base case Pay bill; the extending class Defer payment adds the behavior of this extension point. (extend)
  • 19. Use Case Diagram: Example Name: Purchase ticket Participating actor: Passenger Entry condition: • Passenger standing in front of ticket distributor. • Passenger has sufficient money to purchase ticket. Exit condition: • Passenger has ticket. Event flow: 1. Passenger selects the number of zones to be traveled. 2. Distributor displays the amount due. 3. Passenger inserts money, of at least the amount due. 4. Distributor returns change. 5. Distributor issues ticket. Anything missing? Exceptional cases!
  • 20. Use Cases are useful to… Determining requirements  New use cases often generate new requirements as the system is analyzed and the design takes shape. Communicating with clients  Their notational simplicity makes use case diagrams a good way for developers to communicate with clients. Generating test cases  The collection of scenarios for a use case may suggest a suite of test cases for those scenarios.
  • 22. A class is a description of a set of objects Each class is represented by a rectangle subdivided into three compartments  Name  Attributes  Operations Class Diagram
  • 24. The "Hello, World" Example import java.awt.Graphics; class HelloWorld extends java.applet.Applet { public void paint (Graphics g) { g.drawString ("Hello, World!", 10, 10); } } Example from: BJR
  • 27. UML Class Notation A class is a rectangle divided into three parts  Class name  Class attributes (i.e. data members, variables)  Class operations (i.e. methods) Modifiers  Private: -  Public: +  Protected: #  Static: Underlined Abstract class: Name in italics
  • 29. UML Class Notation Lines or arrows between classes indicate relationships  Association  A relationship between instances of two classes, where one class must know about the other to do its work, e.g. client communicates to server  indicated by a straight line or arrow  Aggregation  An association where one class belongs to a collection, e.g. instructor part of Faculty  Indicated by an empty diamond on the side of the collection  Composition  Strong form of Aggregation  Lifetime control; components cannot exist without the aggregate  Indicated by a solid diamond on the side of the collection  Inheritance  An inheritance link indicating one class a superclass relationship, e.g. bird is part of mammal  Indicated by triangle pointing to superclass
  • 30. Binary Association myB.service(); myA.doSomething() ; Binary Association: Both entities “Know About” each other Optionally, may create an Associate Class
  • 31. Unary Association A knows about B, but B knows nothing about A Arrow points in direction of the dependency myB.service();
  • 32. Aggregation Aggregation is an association with a “collection-member” relationship void doSomething() aModule.service(); Hollow diamond on the Collection side No sole ownership implied
  • 33. Composition Composition is Aggregation with: Lifetime Control (owner controls construction, destruction) Part object may belong to only one whole object Filled diamond on side of the Collection members[0] = new Employee(); … delete members[0];
  • 34. Inheritance Standard concept of inheritance class B() extends A … Base Class Derived Class
  • 35. UML Multiplicities Multiplicities Meaning 0..1 zero or one instance. The notation n . . m indicates n to m instances. 0..* or * no limit on the number of instances (including none). 1 exactly one instance 1..* at least one instance Links on associations to specify more details about the relationship
  • 38. Activity diagram Activity diagram supplements the use case by providing a graphical representation of the flow of interaction within a specific scenario Similar to the flowchart
  • 39. Activity diagram: notation Rounded rectangles to imply a specific system function, Arrows to represent flow through the system, Decision diamonds to depict a branching decision Solid horizontal lines to indicate that parallel activities are occurring
  • 40. Activity diagram for Access camera surveillance via the Internet—display camera views function
  • 42. References Cornell University, USA http://www.cs.cornell.edu/courses/cs501/2000fa/slides.html Shiyuan Jin, Fall 2006 (Student in UCR)Shiyuan Jin, Fall 2006 (Student in UCR) Roger s. pressman, Software Engineering a practitioners approach, 7th ed