Object Oriented Programming
Object Oriented Programming
9618
OBJECT ORIENTED PROGRAMMING
What is meant by OOP
Variables
Methods
Functions
Class Object
Putting the data (attributes) and methods
together as a single unit is called Encapsulation
Declaration Of Methods and Attributes
There are two declaration methods in OOP
Public Private
def __init__():
Constructor In Python
QUESTION
P1 P2
name : "Ghost" name : "Ninja"
age : 21 age : 19
getAge () getAge ()
Player
Object 1 Object 2
name :
age :
displayName ()
Class
Defining a class
Creating Objects
Practice Question
How To Declare Attribute As
Private In Python
self.__LessonType
self.__Fees
self.__Name