0% found this document useful (0 votes)
23 views

Introduction To Object Oriented Programming: Muhammad Niswar

This document provides an introduction to object-oriented programming concepts including the differences between procedural and object-oriented paradigms, core object-oriented concepts like classes and objects, and benefits of an object-oriented approach. It outlines key components of object-oriented programming like classes, which define objects and their behaviors and properties, and objects, which are instances of classes. The document also discusses organizing classes into inheritance hierarchies to show relationships between superclasses and subclasses.

Uploaded by

Electro18 GT
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views

Introduction To Object Oriented Programming: Muhammad Niswar

This document provides an introduction to object-oriented programming concepts including the differences between procedural and object-oriented paradigms, core object-oriented concepts like classes and objects, and benefits of an object-oriented approach. It outlines key components of object-oriented programming like classes, which define objects and their behaviors and properties, and objects, which are instances of classes. The document also discusses organizing classes into inheritance hierarchies to show relationships between superclasses and subclasses.

Uploaded by

Electro18 GT
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

Introduction to Object Oriented

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.

• Object oriented paradigm:


— the code is organized into classes that each contain procedures
for manipulating instances of that class alone.
Procedural Programming
OOP Approach
OOP Concept
— An approach to the solution of problems in which all
computations are performed in the context of objects.
— The objects are instances of classes, which:
— are data abstractions
— contain procedural abstractions that operate on the objects
— A running program can be seen as a collection of objects
collaborating to perform a given task
Benefit of OOP
— Modularity
— Extensibility
— Reusablility
OOP Components


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

You might also like