Introduction To Object Technology Principles of Modeling and Principles of Object Orientation 1
Introduction To Object Technology Principles of Modeling and Principles of Object Orientation 1
Introduction To Object Technology Principles of Modeling and Principles of Object Orientation 1
Principles
Ingrid Kirschning & Gerardo Ayala
Object Oriented Paradigm
(Paradigm: a way of seeing and doing things)
• Object - Oriented (OO) Programming:
– Organizing software as a collection of objects with a certain state
and behavior.
• Object Oriented Design:
– Based on the identification & organization of objects.
• OO Methodology
– Construction of models
– The development of SW is a modeling process
• OO Modeling and Design
– Modeling objects based on the real world
– Using models to design independently of a programming language .
Objects
• Object: Complex data type that has an identity,
contains other data types called attributes and
modules of code called operations or methods
• Attributes and associated values are hidden inside
the object.
• Any object that wants to obtain or change a value
associated with other object, must do so by
sending a message to one of the objects (invoking
a method)
Objects
methods (methods)
Object: woman
Attributes (values)
method: Age: 35
Set_salary Salary: 10
employer friend
Encapsulation
• Each objects methods manage it’s own attributes.
• This is also known as hiding.
• An object A can learn about the values of
attributes of another object B, only by invoking
the corresponding method (message) associated to
the object B.
• Example:
– Class: Lady
– Attributes: Age, salary
– Methods: get_age, set_salary
Procedural vs. Object-Oriented
Procedural application OO-application
DATA
Line of code Data is stored
Line of code independent
Line of code of application
Objects:
subclasses