Unit-V - OOP Concept Design & UML
Unit-V - OOP Concept Design & UML
Unit-V - OOP Concept Design & UML
Unit-
Unit-V
Kailash Soni
Associate Professor
Department of Computer Science & Engineering
SKIT, Jaipur
Software Engineering
Syllabus
2
Unit-V
Object Oriented Analysis:
• Object Oriented Analysis Modeling,
• Data modeling.
Object Oriented Design:
• OOD concepts,
• Class and object relationships,
• object modularization,
Introduction to Unified Modeling Language
3
Course: Software Engineering
Unit-
Unit-V
(Lecture: 1)
Object-
Object-Oriented Software Engineering (OOSE) :
Concepts and Process Model
Kailash Soni
Associate Professor
Department of Computer Science & Engineering
SKIT, Jaipur
Contents
OBJECT-ORIENTED CONCEPTS
DIFFERENCE BETWEEN STRUCTURED AND OO APPROACHES
IDENTIFYING THE ELEMENTS OF AN OBJECT MODEL
THE OO PROCESS MODEL
MANAGEMENT OF OBJECT-ORIENTED SOFTWARE PROJECTS
OBJECT-
OBJECT-ORIENTED CONCEPTS
• A class encapsulates the data/attributes and the
operations/methods/services that manipulate them
• Attributes in the class are enclosed by the “wall” of
operations
• This achieves information hiding
• Classes are cohesive
• Class is decoupled from other elements of a system
• Reduces the impact of side effects caused by
change
• All of these lead to high quality software.
OBJECT-
OBJECT-ORIENTED CONCEPTS: INHERITANCE
Unit-
Unit-V
(Lecture: 2)
2)
Object-
Object-Oriented Analysis (OOA)
Kailash Soni
Associate Professor
Department of Computer Science & Engineering
SKIT, Jaipur
Contents
Introduction
OOA Methods
Domain Analysis
Activities:
Unit-
Unit-V
(Lecture: 3)
Kailash Soni
Associate Professor
Department of Computer Science & Engineering
SKIT, Jaipur
Contents
• Introduction
• Analysis
• Design
• Characteristics of OOD
• Layers of Object-Oriented Design
Introduction
• OOA: we find and describe objects or concepts in the problem
domain
• What is needed?
• Required functions
• Not an implementation
[R. S. Pressman, Software Engineering A Practitioner’s Approach, 5th ed. New York: Mc Graw Hill, 2001.}
Process flow for OOD
[R. S. Pressman, Software Engineering A Practitioner’s Approach, 5th ed. New York: Mc Graw Hill, 2001.}
Task and Resource Management
• The characteristics of the task are determined
• The priority and criticality of the task must also be determined
• High-priority tasks must have immediate access to system resources
• High-criticality tasks must continue to operate even if resource
availability is reduced or the system is operating in a degraded state
• A variety of different resources are available to an OO system like
external entities (e.g., disk drive, processor, or communication line) or
abstractions (e.g., database, object)
Unified Approach to OOD
• Booch, Rumbaugh and Jacobson combined the best features of their
individual object-oriented analysis and design methods into the
Unified Modeling Language (UML)
• UML is organized into two major design activities: system design and
object design
Unit-
Unit-V
(Lecture: 4)
4)
Kailash Soni
Associate Professor
Department of Computer Science & Engineering
SKIT, Jaipur
Contents
Introduction
UML Diagrams
Class Diagram
Introduction
Passenger
Exit condition:
• Passenger has ticket.
The <<extends>> Relationship
• <<extends>> relationships
represent exceptional cases.
Passenger
• The direction of a
<<extends>> relationship is
to the extended use case
PurchaseTicket
<<extends>>
<<extends>>
<<extends>> TimeOut
OutOfOrder
<<extends>>
Cancel NoChange
The <<includes>> Relationship
Passenger
• <<includes>>
PurchaseTicket <<extends>> relationship represents
behavior that is factored
<<extends>> Purchase out of the use case for
MultiCard
reuse, not because it is an
Purchase exception.
Single Ticket
<<includes>> • The direction of a
<<includes>>
<<includes>>
relationship is to the
using use case
CollectMoney
<<extends>> <<extends>>
NoChange Cancel
Use Cases are useful to…
• Determining requirements
• Communicating with clients and developers
• Generating test cases
Class Diagrams
• Gives an overview of a system by showing its classes and the
relationships among them.
• Also shows attributes and operations of each class
• Detailed class diagrams are used for developers
• Modifiers
• Private: -
• Public: +
• Protected: #
Name
Account_Name
- Customer_Name
- Balance Attributes
+addFunds( ) Operations
+withDraw( )
+transfer( )
OO Relationships
Customer
- Generalization expresses
or: Customer
a parent/child
relationship among
related classes.
Regular Loyalty
Customer Customer
OO Relationships: Association
• Represent relationship between instances of classes
• Student enrolls in a course
• Courses have students
• Courses have exams
• Etc.
Student 1 * course
OO Relationships: Composition
Whole Class
Class W
Class P1 Class P2
Part Classes
Expresses a relationship among
instances of related classes.
Example
It is a specific kind of Whole-
Automobile Part relationship.
Engine Transmission
OO Relationships: Aggregation
Container Class Expresses a relationship among instances of
Class C
related classes. It is a specific kind of
Container-Containee relationship.
AGGREGATION
It is an appropriate relationship where the
Container and its Containees can be
Class E1 Class E2 manipulated independently.
Containee Classes
Example
Bag
Apples Milk
Cardinality and Modality
* 4
Students Course
have enrolls
UML Diagrams
Course: Software Engineering
Unit-
Unit-V
(Lecture: 5)
Kailash Soni
Associate Professor
Department of Computer Science & Engineering
SKIT, Jaipur
Contents
• Activity Diagrams
• Sequence Diagrams
• Collaboration Diagrams
• State Transition Diagrams
• Package Diagram
• Component Diagrams
• Deployment Diagrams
Activity Diagram
• Displays the flow of activities involved in a single process
OR
Refers to the steps involved in the execution of a use case
Start
Ref: https://www.slideshare.net/sunilkumar710/online-shopping-cart-system-file
Collaboration Diagram
Ref: https://www.slideshare.net/sunilkumar710/online-
shopping-cart-system-file
State Diagram
Shows the possible states of the object and the transitions that cause a change in state
Notation
• States are rounded rectangles
• Transitions are arrows from one state to another.
• Events or conditions that trigger transitions are written beside the arrows
• Initial and Final States indicated by circles as in the Activity Diagram
• Final state terminates the action; may have multiple final states
State Diagram
Ref: https://www.slideshare.net/sunilkumar710/online-shopping-cart-system-file
Package Diagram
Ref: https://www.visual-paradigm.com/guide/uml-unified-modeling-language/what-is-package-diagram/
Component Diagram
Ref: https://www.tutorialspoint.com/uml/uml_component_diagram.htm
Component Diagram
Ref: http://docshare02.docshare.tips/files/23568/235682525.pdf
Deployment Diagram
• Used to visualize the topology of the physical components of a system, where the
software components are deployed.
• Used to describe the static deployment view of a system
• Shows how the components are deployed in hardware.
Deployment Diagram
THANKS