Introduction To Object Oriented Programming: Muhammad Niswar
Introduction To Object Oriented Programming: Muhammad Niswar
Programming
Muhammad Niswar
Outline
OOP Paradigm vs. Procedural Paradigm
OOP Concept
OOP Benefits
OOP Components
Why Programming skill is needed
Software Defined
Computer programmers are in short supply
Become an Entrepreneur (Startup)
Most Organization required Programmer
Procedural vs. Object Oriented
paradigm
Procedural vs. OO paradigm
Procedural paradigm:
the code is organized into functions that each manipulate
different types of data.
•
Classes
A class:
A unit of abstraction in an
object oriented (OO)
program
Describes what an object
knows and what an
object does
A Blueprint
Objects
An instance of a class.
A chunk of structured data
in a running software
system
Has properties
Represent its state
Has behaviour
How it acts and reacts
May simulate the behaviour
of an object inthe real
world
Objects
Object creation and deletion
What is the difference between a class
and an object?
A class is not an object
(but it is used to construct them)
• A class is a blueprint for an object.
• Something should be a class if it could have objects.
• Something should be an object if it is clearly a single member of
the set defined by a class
Organizing Classes into Inheritance
Hierarchies
Superclasses
Contain features common to a set of subclasses
Inheritance hierarchies
Show the relationships among superclasses and subclasses
A triangle shows a generalization
Inheritance
The implicit possession by all subclasses of features defined in its
superclasses
An Example Inheritance Hierarchy
Inheritance
– The implicit possession by all subclasses of
features defined in its superclasses
A possible inheritance hierarchy of
mathematical objects