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

Python OOPs Concepts Day 4

This document discusses object-oriented programming concepts in Python including classes, objects, inheritance, encapsulation, polymorphism, and the difference between procedural and object-oriented programming.

Uploaded by

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

Python OOPs Concepts Day 4

This document discusses object-oriented programming concepts in Python including classes, objects, inheritance, encapsulation, polymorphism, and the difference between procedural and object-oriented programming.

Uploaded by

Sumaya Akter
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Python OOPs

Concepts

Copyright Intellipaat. All rights reserved.


Agenda

01 Introduction to OOPs 02 Procedural vs Object Oriented

03 Python Class 04 Objects in Python

Copyright Intellipaat. All rights reserved.


Introduction to OOPs

Object oriented programming or OOPs


programming paradigm operates with the
help of creating objects and using those
objects to call member functions, classes,
etc.

Copyright Intellipaat. All rights reserved.


Introduction to OOPs

Classes and Objects

Method Overriding and Method Overloading

Abstraction, Encapsulation, Polymorphism

Inheritance(Single, Multiple, Multilevel,


Hierarchical)

Copyright Intellipaat. All rights reserved.


Procedural vs Object Oriented Programming
Procedural Programming Object Oriented Programming

Based on calling objects rather than functions


Based on the concept of calling procedures
or logic.

Follows a top-down approach and is less Follows a bottom-up approach and is highly
secure secure

No access modifiers Public, private and protected access modifiers

No code reusability or overloading Supports code reusability and overloading

Copyright Intellipaat. All rights reserved.


Classes in Python

A class is a blueprint to create objects, an


accumulation of functions and data
members that share the same scope and
gets instantiated when the object is created.

Copyright Intellipaat. All rights reserved.


Classes in Python

Class Members - The name, age and prof,


are the class members in the example
shown here

Class Method - the __init__ and the disp()


are the class methods in this example.

Copyright Intellipaat. All rights reserved.


Python Objects

An object is the instance of the class which


is used to call the member functions,
attributes, etc.

Copyright Intellipaat. All rights reserved.


Self keyword

The self keyword or parameter is the


reference to the current instance of the
class. It is used to access the members of
the current class.

Copyright Intellipaat. All rights reserved.

You might also like