0% found this document useful (0 votes)
117 views12 pages

OOPS & Strings

1. Object oriented programming involves classes and objects. A class defines properties and functions as a blueprint, while objects are instances of classes that bundle both data and functions. 2. Encapsulation binds data to functions that operate on that data. It places data and functions together, acting as a data binding mechanism. 3. Polymorphism allows redefining how something works, like overloading functions with the same name but different behaviors, or overriding a defined behavior with a new one. Inheritance reuses code by deriving classes from base classes so derived classes can use base class functions.

Uploaded by

kumarari
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)
117 views12 pages

OOPS & Strings

1. Object oriented programming involves classes and objects. A class defines properties and functions as a blueprint, while objects are instances of classes that bundle both data and functions. 2. Encapsulation binds data to functions that operate on that data. It places data and functions together, acting as a data binding mechanism. 3. Polymorphism allows redefining how something works, like overloading functions with the same name but different behaviors, or overriding a defined behavior with a new one. Inheritance reuses code by deriving classes from base classes so derived classes can use base class functions.

Uploaded by

kumarari
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/ 12

OOPS & Strings

OOPS
Object Oriented programming is a
programming style that is associated with the
concept of Class, Objects
Class
A class is a blueprint for any functional entity
which defines its properties and its functions.
Objects
This is the basic unit of object oriented
programming.
both data and function that operate on data
are bundled as a unit called as object.
instance/object of class
You can create objects with the syntax
classname object;
Eg: Student s;
Encapsulation

binding of the properties to functions is called


Encapsulation.
placing the data and the functions that work
on that data
It is a mechanism of bundling the data, and
the functions that use them
It can also be said data binding.
Polymorphism

allows us to redefine the way something works


If we walk using our hands, and not legs, here we
will change the parts used to perform something.
Hence this is called Overloading.(Static)
And if there is a defined way of walking, but I
wish to walk differently, but using my legs, like
everyone else. Then I can walk like I want, this
will be calles as Overriding.(Dynamic)
function with same name, functioning in
different way
Inheritance

Inheritance is a way to reuse once written


code again and again.
The class which is inherited is called base calls
& the class which inherits is called derived
class.
when, a derived class inherits a base class, the
derived class can use all the functions which
are defined in base class
Base Class
Derived Class
Main Function
Main Function
Abstraction

Data abstraction refers to, providing only


essential information to the outside world and
hiding their background details, i.e., to represent
the needed information in program without
presenting the details.
Eg: Human Being's can talk, walk, hear, eat, but
the details are hidden from the outside world.
We can take our skin as the Abstraction factor in
our case, hiding the inside mechanism.

You might also like