3 Oop
3 Oop
[Midterm Period]
Object-Oriented
Programming
Prepared by:
Dahlia S. de Mesa
BSCOE, MBA, MIT
Introduction
Simula was the first language to support all of the key features of
OOP, including classes, objects, inheritance, and polymorphism.
In the 1970s, Alan Kay and his team at Xerox PARC developed the
Smalltalk language.
Introduction
Abstraction
allows a programmer to hide all but the relevant
information (to the problem at hand) about an object in
order to reduce complexity and increase efficiency
closely related to encapsulation and information hiding
Key OOP Concepts
Encapsulation
refers to the hiding of data (attributes) and methods within an
object
protects an object’s data from corruption
protects the object’s data from arbitrary and unintended use
hides the details of an object’s internal implementation from the
users of an object
separates how an object behaves from how it is implemented
easier to modify programs since one object type is modified at a
time
Encapsulation
Illustration
Key OOP Concepts
Inheritance
the process by which objects can acquire (inherit) the
properties of objects of other class
Student
Key OOP Concepts
Polymorphism
refers to the ability to process objects differently
depending on their data type or class
Illustration
Application Student
Form
s.isRegistered()
c.isRegistered()
Car
Bravo Baste!