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

Oops

Object-oriented programming (OOP) is a programming paradigm centered around 'objects' that contain data and code. Key concepts of OOP include objects, classes, inheritance, polymorphism, encapsulation, and abstraction, which facilitate code reusability and organization. Examples illustrate how these concepts function in practical scenarios, such as classes representing categories of objects and methods defining behaviors.

Uploaded by

samuel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views

Oops

Object-oriented programming (OOP) is a programming paradigm centered around 'objects' that contain data and code. Key concepts of OOP include objects, classes, inheritance, polymorphism, encapsulation, and abstraction, which facilitate code reusability and organization. Examples illustrate how these concepts function in practical scenarios, such as classes representing categories of objects and methods defining behaviors.

Uploaded by

samuel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 9

OBJECT ORIENTED

PROGRAMMING

Prepared by

Mr.C.Ramesh Kumar HOD/CSE


What is OOP
OOP (Object-oriented programming) is a
programming paradigm based on the concept of
"objects", which can contain data and code: data
in the form of fields (often known as attributes
or properties), and code, in the form of
procedures (often known as methods).
Basic Concepts of OOPS
1.Object
2.Class
3.Abstraction
4.Inheritance
5.Polymorphism
6. Encapsulation
OBJECT
Any entity that has state and behavior is known as an object. For example, a chair, pen, table,
keyboard, bike, etc. It can be physical or logical.

Example: A dog is an object because it has states like color, name, breed, etc. as well as
behaviors like wagging the tail, barking, eating, etc.

CLASS
Collection of objects is called class. It is a logical entity.

Example: If you had a class called “Expensive


Cars” it could have objects like Mercedes, BMW,
Toyota, etc. Its properties(data) can be price or
speed of these cars. While the methods may be
performed with these cars are driving, reverse,
braking etc.
INHERITANCE

When one object acquires all the


properties and behaviors of a parent
object, it is known as inheritance. It
provides code reusability.
POLYMORPHISM

If one task is performed in different


ways, it is known as polymorphism.

For example, a cat speaks meow, dog


barks woof, etc.

To draw something, for example,


shape, triangle, rectangle, etc.
ENCAPSULATION

Binding (or wrapping) code and data together


into a single unit are known as encapsulation.
For example, a capsule, it is wrapped with
different medicines
ABSTRACTION

Hiding internal details and showing


functionality is known as abstraction.

For example, while driving a car, you do not


have to be concerned with its internal working.
Here you just need to concern about parts like
steering wheel, Gears, accelerator, etc.
Example
Class employee
{
String employee name;
Private int salary
Int salary 1;
Int salart 2;

Class A()
{
Void method ()
}
Class B() exten d class A()
{
Void method2 ()
}
Abstract void name(

You might also like