Object-oriented software engineering is a process that uses object-oriented concepts to solve customer problems and develop large, high-quality software systems efficiently. It views software as a collection of discrete objects that encapsulate their data and functionality. This methodology encourages modeling the real world as a system of cooperative objects. Benefits include faster development, reusability, increased quality, and easier maintenance compared to traditional approaches.
2. 3
Two Orthogonal views of software
The StructuralStructural
"part of" hierarchy, functions
concentrate on actual components
concrete
The Object OrientedObject Oriented
"is a" hierarchy
concentrate on kinds of components
abstract
4
A View of the Two paradigms
14. 27
Identification of Attributes
• Attributes express some important aspects of the
objects in the problem domain
Leg
Leg
Body
Arm
Arm
Head
A model of a B
Body can be
composed of
these objects.
28
JohnJohn
Identification
of Attributes
Identification
of Behaviors
ShafiShafi JohnJohn MaryMary
16. 31
Inheritance
Class of PersonClass of Person
AttributesAttributes
Name
Address
Age
Profession
BodyBody
Left Leg
Right Leg
Left Hand
Right Hand
Head
BehaviorBehavior
Tell Age
Store Age
Jump
Walk
Dance
…….
Create an InstanceCreate an Instance
Create Left Leg
Create Right Leg
Create Head
Create Left Hand
Create Right Hand
Class PersonClass Person
Instance of
Instance of
Instance of
3 November 2014R. MD. Shafi, Associate Professor in CSE
32
Step-4: Inheritance Contd…
Class BodyClass Body
AttributesAttributes
Left Leg
Right Leg
Left Hand
Right Hand
Head
BehaviorBehavior
Move Right Hand
Move Left Hand
Stretch Right Leg
Bend Left Leg
…………...
Create A BodyCreate A Body
Create Left Leg
Create Right Leg
Create Head
Create Left Hand
Create Right Hand
17. 33
Class of PersonClass of Person
AttributesAttributes
Name
Address
Age
Body
Profession
BehaviorBehavior
Tell Age
Store Age
Jump
Walk
Dance
…….
Create A PersonCreate A Person
Create A Body
Class PersonClass Person
Instance of
Instance of
Instance of
Inheritance
34
Inheritance: Person-Man-Woman
AttributesAttributes
Husband
BehaviorBehavior
Store Age
Jump
Walk
Dance
…….
Create A WomanCreate A Woman
Create A Person
Female ClassFemale Class
Derived fromDerived from
Person ClassPerson Class
AttributesAttributes
Wife
BehaviorBehavior
Tell Age
Store Age
Jump
Walk
Dance
…….
Create A ManCreate A Man
Create A Person
Male ClassMale Class
Derived fromDerived from
Person ClassPerson Class
18. 35
Object Technology Principles
Common Methods of Organization
Abstraction
Encapsulation (Information Hiding)
Inheritance
Polymorphism
Message Communication
Associations
Reuse
36
• Common Methods of Organization
People are accustomed to thinking in terms of...
• color
• price
• weight
• engine
• options...
Objects & Attributes
• number of doors
• number of wheels
• number of windows
• number of lights
• number of bolt type 1
• number of bolt type 2
• etc....
Wholes and PartsGroups & Members
VANS:
• light utility
• utility
• passenger
• etc...
19. 37
Abstraction
A mental ability that permits people to view real-world
problem domains with varying degrees of detail
depending on the current context of the problem.
• Helps people to think about what they are doing
• Functional and Data abstraction
38
Encapsulation (Information Hiding)
A technique in which data are packaged together with
their corresponding procedures.
In Object-Oriented Technology the “package” is called an OBJECT
The interface to each object is defined in such a way as to reveal as little as
possible about its inner workings
Encapsulation allows [software] changes to be reliably made with limited effort
[Gannon, Hamlet, & Mills, 1987]
20. 39
Inheritance
A mechanism for expressing similarity
between things thus simplifying their definition.
• looks
• behavior
•Attitudes etc...
Person
Student Faculty Staff
Inheritance
40
Polymorphism (“many forms”)
The ability to hide different implementations
behind a common interface.
The ability for two or more objects to respond
to the same request, each in its own way.
• H2 O = water, ice, steam (liquid, solid, vapor)
• Carbon compound crystallizes as graphite &
diamond