SlideShare a Scribd company logo
1 of 18
OOPS
(Object Oriented Programming Language)
1) Python is an object-oriented programming language.
2) Means we can solve any problem by creating objects in our programs.
3) Python is a multi-paradigm programming language. Which means it
supports different programming approach.
OOPS Terminologies:
 Object
An object is an entity that has attributes and behavior.
for e.g. Riya is an object who has attributes such as height, weight, etc. and has certain behaviors
such as walking, talking, eating etc.
 Class
A class is a blueprint for the objects.
For e.g. Riya is object so we can define a class Human for her.
 Methods
Object has attributes and behaviors. These behaviors are called methods. Methods are defined
inside the body of a class
 Inheritance
Inheritance is a way of creating new class for using details of existing class without modifying it.
The newly formed class is a derived class similarly, the existing class is a base class.
types of Inheritance:
a) Single Inheritance
b) Multiple Inheritance
c) Multilevel Inheritance
d) Hierarchical Inheritance
e) Hybrid Inheritance
A) Single Inheritance:
A single Python inheritance is when a single class inherits from a class.
Syntax:
class A:
#properties of class A
class B(A):
#properties of class B
# class B inheriting the properties of class A
B) Multiple Inheritance:
means that you're inheriting the property of multiple classes into one.
Syntax:
class A:
# variable of class A
# functions of class A
class B:
# variable of class A
# functions of class A
class C(A, B):
# class C inheriting property of both class A and B
C) Multilevel Inheritance:
In multilevel inheritance, we inherit the classes at multiple separate levels.
Syntax:
class A:
# properties of class A
class B(A):
# class B inheriting property of class A
# more properties of class B
class C(B):
# class C inheriting property of class B
# thus, class C also inherits properties of class A
# more properties of class C
D) Hierarchical Inheritance:
When more than one class inherits from a class, it is hierarchical inheritance.
Syntax:
class A:
#properties of class A
class B(A):
#class B inheriting property of class A
# properties of class B
class C(A):
# class C inheriting property of class B
# thus, class C also inherits properties of class A
# properties of class C
E) Hybrid Inheritance :
Hybrid Python inheritance is a combination of any two kinds of inheritance.
Syntax:
class A:
# properties of class A
class B(A):
#class b inheriting the properties of class A
class C(A):
#Class C inheriting the properties of class A
class D(B,C):
# class D inheriting the properties of both class B and C
obj=D()
 Encapsulation:
We can restrict access to methods and variables. This prevent data from direct
modification which is called encapsulation.
we denote private attribute using underscore as prefix i.e. single “ _ “ or double “ __“.
 Polymorphism
Polymorphism is an ability to use common interface for multiple form.
For e.g. We need to color a shape, there are multiple shape like (rectangle, square, circle). So we
could use same method to color any shape. This concept is called Polymorphism.
Creation of Class and Objects :
A class is defined using the keyword class.
class Test:
def fun(self,x,y):
print(x+y)
obj = Test()
obj.fun(10,20)
The self
o Class’s methods must have an extra first parameter . We do not give a value for that
parameter when we call the method.
o When we call a method of this object as myobject.method(arg1, arg2), this is
automatically converted by Python into MyClass.method(myobject, arg1, arg2) – this is
all the special self is about.
Super Function:
super() allows us to call a method from the parent class.
class First:
def start(self):
print("Start")
def stop(self):
print("Stop")
class Second(First):
def execute(self):
super().start()
print("execute")
super().stop()
obj=Second()
obj.execute()
Constructors
A constructor is a special type of method (function) which is used to initialize the instance
members of the class. Constructor can be parameterized and non-parameterized as well.
A constructor is a class function that begins with double underscore (_). The name of the
constructor is always the same __init__().
When we create a class without a constructor, Python automatically creates a default constructor.
Non Parameterized Constructor
class Abc:
def __init__(self):
print("non parametrized constructor")
def show(self,name):
print("Hello",name)
bb = Abc()
bb.show(“welly")
Parameterized Constructor
class Student:
def __init__(self, name):
print("This is parametrized constructor")
self.n = name
def show(self):
print("Hello",self.n)
student = Student(“welly")
student.show()
Destructors
Destructors are called when an object gets destroyed.
The __del__() method is a known as a destructor method in Python.
class Employee:
def __init__(self):
print('Employee created.')
def __del__(self):
print('Destructor called, Employee deleted.')
obj = Employee()
del obj
File Handling
a) The key function for working with files is open() function.
b) open() function takes two parameters; filename, and mode.
There are four different modes for opening a file:
"r" - Read - Opens a file for reading, error occurs if file does not exist.
"w" - Write - Opens a file for writing, creates the file if it does not exist.
"x" - Create - Creates the specified file, returns an error if the file exists
"a" - Append - Opens a file for appending, creates the file if it does not exist.
‘r+’- Open a file for updating (reading and writing)
#Single
class Animal:
def speak(self):
print("Animal Speaking")
class Dog(Animal):
def bark(self):
print("dog barking")
d = Dog()
d.bark()
d.speak()
# Multi-level
class Animal:
def speak(self):
print("Animal Speaking")
class Dog(Animal):
def bark(self):
print("dog barking")
class DogChild(Dog):
def eat(self):
print("Eating bread...")
d = DogChild()
d.bark()
d.speak()
d.eat()
#Multiple
class Calculation1:
def Summation(self,a,b):
return a+b;
class Calculation2:
def Multiplication(self,a,b):
return a*b;
class Derived(Calculation1,Calculation2):
def Divide(self,a,b):
return a/b;
d = Derived()
print(d.Summation(10,20))
print(d.Multiplication(10,20))
print(d.Divide(10,20))

More Related Content

Similar to OOPS.pptx

Presentation 3rd
Presentation 3rdPresentation 3rd
Presentation 3rd
Connex
 

Similar to OOPS.pptx (20)

Object Oriented Programming.pptx
Object Oriented Programming.pptxObject Oriented Programming.pptx
Object Oriented Programming.pptx
 
ITT 202 PRINCIPLES OF OBJECT ORIENTED TECHNIQUE
ITT 202 PRINCIPLES OF OBJECT ORIENTED TECHNIQUEITT 202 PRINCIPLES OF OBJECT ORIENTED TECHNIQUE
ITT 202 PRINCIPLES OF OBJECT ORIENTED TECHNIQUE
 
Introduction to Python - Part Three
Introduction to Python - Part ThreeIntroduction to Python - Part Three
Introduction to Python - Part Three
 
Inheritance
Inheritance Inheritance
Inheritance
 
C++ interview question
C++ interview questionC++ interview question
C++ interview question
 
Presentation 3rd
Presentation 3rdPresentation 3rd
Presentation 3rd
 
Oop java
Oop javaOop java
Oop java
 
python p.pptx
python p.pptxpython p.pptx
python p.pptx
 
Python_Unit_3.pdf
Python_Unit_3.pdfPython_Unit_3.pdf
Python_Unit_3.pdf
 
Python Classes_ Empowering Developers, Enabling Breakthroughs.pdf
Python Classes_ Empowering Developers, Enabling Breakthroughs.pdfPython Classes_ Empowering Developers, Enabling Breakthroughs.pdf
Python Classes_ Empowering Developers, Enabling Breakthroughs.pdf
 
Python Classes_ Empowering Developers, Enabling Breakthroughs.pdf
Python Classes_ Empowering Developers, Enabling Breakthroughs.pdfPython Classes_ Empowering Developers, Enabling Breakthroughs.pdf
Python Classes_ Empowering Developers, Enabling Breakthroughs.pdf
 
C++ programming introduction
C++ programming introductionC++ programming introduction
C++ programming introduction
 
601109769-Pythondyttcjycvuv-Inheritance .pptx
601109769-Pythondyttcjycvuv-Inheritance .pptx601109769-Pythondyttcjycvuv-Inheritance .pptx
601109769-Pythondyttcjycvuv-Inheritance .pptx
 
C# classes objects
C#  classes objectsC#  classes objects
C# classes objects
 
Opp concept in c++
Opp concept in c++Opp concept in c++
Opp concept in c++
 
Chapter 05 classes and objects
Chapter 05 classes and objectsChapter 05 classes and objects
Chapter 05 classes and objects
 
Introduction to object oriented programming concepts
Introduction to object oriented programming conceptsIntroduction to object oriented programming concepts
Introduction to object oriented programming concepts
 
C++ classes tutorials
C++ classes tutorialsC++ classes tutorials
C++ classes tutorials
 
iOS development introduction
iOS development introduction iOS development introduction
iOS development introduction
 
Inheritance in Java
Inheritance in JavaInheritance in Java
Inheritance in Java
 

More from NitinSharma134320 (6)

Battle of Bands.pptx
Battle of Bands.pptxBattle of Bands.pptx
Battle of Bands.pptx
 
Presentation.pptx
Presentation.pptxPresentation.pptx
Presentation.pptx
 
COCOMO
COCOMOCOCOMO
COCOMO
 
PY_17_06_20-1.pptx
PY_17_06_20-1.pptxPY_17_06_20-1.pptx
PY_17_06_20-1.pptx
 
Machine Learning.pptx
Machine Learning.pptxMachine Learning.pptx
Machine Learning.pptx
 
shantanu_11_30.ppt
shantanu_11_30.pptshantanu_11_30.ppt
shantanu_11_30.ppt
 

Recently uploaded

Gartner's Data Analytics Maturity Model.pptx
Gartner's Data Analytics Maturity Model.pptxGartner's Data Analytics Maturity Model.pptx
Gartner's Data Analytics Maturity Model.pptx
chadhar227
 
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
gajnagarg
 
怎样办理旧金山城市学院毕业证(CCSF毕业证书)成绩单学校原版复制
怎样办理旧金山城市学院毕业证(CCSF毕业证书)成绩单学校原版复制怎样办理旧金山城市学院毕业证(CCSF毕业证书)成绩单学校原版复制
怎样办理旧金山城市学院毕业证(CCSF毕业证书)成绩单学校原版复制
vexqp
 
Cytotec in Jeddah+966572737505) get unwanted pregnancy kit Riyadh
Cytotec in Jeddah+966572737505) get unwanted pregnancy kit RiyadhCytotec in Jeddah+966572737505) get unwanted pregnancy kit Riyadh
Cytotec in Jeddah+966572737505) get unwanted pregnancy kit Riyadh
Abortion pills in Riyadh +966572737505 get cytotec
 
Lecture_2_Deep_Learning_Overview-newone1
Lecture_2_Deep_Learning_Overview-newone1Lecture_2_Deep_Learning_Overview-newone1
Lecture_2_Deep_Learning_Overview-newone1
ranjankumarbehera14
 
怎样办理圣路易斯大学毕业证(SLU毕业证书)成绩单学校原版复制
怎样办理圣路易斯大学毕业证(SLU毕业证书)成绩单学校原版复制怎样办理圣路易斯大学毕业证(SLU毕业证书)成绩单学校原版复制
怎样办理圣路易斯大学毕业证(SLU毕业证书)成绩单学校原版复制
vexqp
 
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
gajnagarg
 
+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...
+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...
+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...
Health
 
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi ArabiaIn Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
ahmedjiabur940
 
Abortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get CytotecAbortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Riyadh +966572737505 get cytotec
 
怎样办理伦敦大学毕业证(UoL毕业证书)成绩单学校原版复制
怎样办理伦敦大学毕业证(UoL毕业证书)成绩单学校原版复制怎样办理伦敦大学毕业证(UoL毕业证书)成绩单学校原版复制
怎样办理伦敦大学毕业证(UoL毕业证书)成绩单学校原版复制
vexqp
 
Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...
gajnagarg
 

Recently uploaded (20)

Dubai Call Girls Peeing O525547819 Call Girls Dubai
Dubai Call Girls Peeing O525547819 Call Girls DubaiDubai Call Girls Peeing O525547819 Call Girls Dubai
Dubai Call Girls Peeing O525547819 Call Girls Dubai
 
Gartner's Data Analytics Maturity Model.pptx
Gartner's Data Analytics Maturity Model.pptxGartner's Data Analytics Maturity Model.pptx
Gartner's Data Analytics Maturity Model.pptx
 
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
 
怎样办理旧金山城市学院毕业证(CCSF毕业证书)成绩单学校原版复制
怎样办理旧金山城市学院毕业证(CCSF毕业证书)成绩单学校原版复制怎样办理旧金山城市学院毕业证(CCSF毕业证书)成绩单学校原版复制
怎样办理旧金山城市学院毕业证(CCSF毕业证书)成绩单学校原版复制
 
Cytotec in Jeddah+966572737505) get unwanted pregnancy kit Riyadh
Cytotec in Jeddah+966572737505) get unwanted pregnancy kit RiyadhCytotec in Jeddah+966572737505) get unwanted pregnancy kit Riyadh
Cytotec in Jeddah+966572737505) get unwanted pregnancy kit Riyadh
 
Lecture_2_Deep_Learning_Overview-newone1
Lecture_2_Deep_Learning_Overview-newone1Lecture_2_Deep_Learning_Overview-newone1
Lecture_2_Deep_Learning_Overview-newone1
 
怎样办理圣路易斯大学毕业证(SLU毕业证书)成绩单学校原版复制
怎样办理圣路易斯大学毕业证(SLU毕业证书)成绩单学校原版复制怎样办理圣路易斯大学毕业证(SLU毕业证书)成绩单学校原版复制
怎样办理圣路易斯大学毕业证(SLU毕业证书)成绩单学校原版复制
 
SR-101-01012024-EN.docx Federal Constitution of the Swiss Confederation
SR-101-01012024-EN.docx  Federal Constitution  of the Swiss ConfederationSR-101-01012024-EN.docx  Federal Constitution  of the Swiss Confederation
SR-101-01012024-EN.docx Federal Constitution of the Swiss Confederation
 
The-boAt-Story-Navigating-the-Waves-of-Innovation.pptx
The-boAt-Story-Navigating-the-Waves-of-Innovation.pptxThe-boAt-Story-Navigating-the-Waves-of-Innovation.pptx
The-boAt-Story-Navigating-the-Waves-of-Innovation.pptx
 
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
 
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
 
+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...
+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...
+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...
 
Aspirational Block Program Block Syaldey District - Almora
Aspirational Block Program Block Syaldey District - AlmoraAspirational Block Program Block Syaldey District - Almora
Aspirational Block Program Block Syaldey District - Almora
 
Sequential and reinforcement learning for demand side management by Margaux B...
Sequential and reinforcement learning for demand side management by Margaux B...Sequential and reinforcement learning for demand side management by Margaux B...
Sequential and reinforcement learning for demand side management by Margaux B...
 
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi ArabiaIn Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
 
Abortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get CytotecAbortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get Cytotec
 
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24  Building Real-Time Pipelines With FLaNKDATA SUMMIT 24  Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
 
怎样办理伦敦大学毕业证(UoL毕业证书)成绩单学校原版复制
怎样办理伦敦大学毕业证(UoL毕业证书)成绩单学校原版复制怎样办理伦敦大学毕业证(UoL毕业证书)成绩单学校原版复制
怎样办理伦敦大学毕业证(UoL毕业证书)成绩单学校原版复制
 
Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...
 
7. Epi of Chronic respiratory diseases.ppt
7. Epi of Chronic respiratory diseases.ppt7. Epi of Chronic respiratory diseases.ppt
7. Epi of Chronic respiratory diseases.ppt
 

OOPS.pptx

  • 2. 1) Python is an object-oriented programming language. 2) Means we can solve any problem by creating objects in our programs. 3) Python is a multi-paradigm programming language. Which means it supports different programming approach. OOPS Terminologies:  Object An object is an entity that has attributes and behavior. for e.g. Riya is an object who has attributes such as height, weight, etc. and has certain behaviors such as walking, talking, eating etc.  Class A class is a blueprint for the objects. For e.g. Riya is object so we can define a class Human for her.  Methods Object has attributes and behaviors. These behaviors are called methods. Methods are defined inside the body of a class
  • 3.  Inheritance Inheritance is a way of creating new class for using details of existing class without modifying it. The newly formed class is a derived class similarly, the existing class is a base class. types of Inheritance: a) Single Inheritance b) Multiple Inheritance c) Multilevel Inheritance d) Hierarchical Inheritance e) Hybrid Inheritance A) Single Inheritance: A single Python inheritance is when a single class inherits from a class. Syntax: class A: #properties of class A class B(A): #properties of class B # class B inheriting the properties of class A
  • 4. B) Multiple Inheritance: means that you're inheriting the property of multiple classes into one. Syntax: class A: # variable of class A # functions of class A class B: # variable of class A # functions of class A class C(A, B): # class C inheriting property of both class A and B
  • 5. C) Multilevel Inheritance: In multilevel inheritance, we inherit the classes at multiple separate levels. Syntax: class A: # properties of class A class B(A): # class B inheriting property of class A # more properties of class B class C(B): # class C inheriting property of class B # thus, class C also inherits properties of class A # more properties of class C
  • 6. D) Hierarchical Inheritance: When more than one class inherits from a class, it is hierarchical inheritance. Syntax: class A: #properties of class A class B(A): #class B inheriting property of class A # properties of class B class C(A): # class C inheriting property of class B # thus, class C also inherits properties of class A # properties of class C
  • 7. E) Hybrid Inheritance : Hybrid Python inheritance is a combination of any two kinds of inheritance. Syntax: class A: # properties of class A class B(A): #class b inheriting the properties of class A class C(A): #Class C inheriting the properties of class A class D(B,C): # class D inheriting the properties of both class B and C obj=D()
  • 8.  Encapsulation: We can restrict access to methods and variables. This prevent data from direct modification which is called encapsulation. we denote private attribute using underscore as prefix i.e. single “ _ “ or double “ __“.  Polymorphism Polymorphism is an ability to use common interface for multiple form. For e.g. We need to color a shape, there are multiple shape like (rectangle, square, circle). So we could use same method to color any shape. This concept is called Polymorphism.
  • 9. Creation of Class and Objects : A class is defined using the keyword class. class Test: def fun(self,x,y): print(x+y) obj = Test() obj.fun(10,20)
  • 10. The self o Class’s methods must have an extra first parameter . We do not give a value for that parameter when we call the method. o When we call a method of this object as myobject.method(arg1, arg2), this is automatically converted by Python into MyClass.method(myobject, arg1, arg2) – this is all the special self is about.
  • 11. Super Function: super() allows us to call a method from the parent class. class First: def start(self): print("Start") def stop(self): print("Stop") class Second(First): def execute(self): super().start() print("execute") super().stop() obj=Second() obj.execute()
  • 12. Constructors A constructor is a special type of method (function) which is used to initialize the instance members of the class. Constructor can be parameterized and non-parameterized as well. A constructor is a class function that begins with double underscore (_). The name of the constructor is always the same __init__(). When we create a class without a constructor, Python automatically creates a default constructor.
  • 13. Non Parameterized Constructor class Abc: def __init__(self): print("non parametrized constructor") def show(self,name): print("Hello",name) bb = Abc() bb.show(“welly") Parameterized Constructor class Student: def __init__(self, name): print("This is parametrized constructor") self.n = name def show(self): print("Hello",self.n) student = Student(“welly") student.show()
  • 14. Destructors Destructors are called when an object gets destroyed. The __del__() method is a known as a destructor method in Python. class Employee: def __init__(self): print('Employee created.') def __del__(self): print('Destructor called, Employee deleted.') obj = Employee() del obj
  • 15. File Handling a) The key function for working with files is open() function. b) open() function takes two parameters; filename, and mode. There are four different modes for opening a file: "r" - Read - Opens a file for reading, error occurs if file does not exist. "w" - Write - Opens a file for writing, creates the file if it does not exist. "x" - Create - Creates the specified file, returns an error if the file exists "a" - Append - Opens a file for appending, creates the file if it does not exist. ‘r+’- Open a file for updating (reading and writing)
  • 16. #Single class Animal: def speak(self): print("Animal Speaking") class Dog(Animal): def bark(self): print("dog barking") d = Dog() d.bark() d.speak()
  • 17. # Multi-level class Animal: def speak(self): print("Animal Speaking") class Dog(Animal): def bark(self): print("dog barking") class DogChild(Dog): def eat(self): print("Eating bread...") d = DogChild() d.bark() d.speak() d.eat()
  • 18. #Multiple class Calculation1: def Summation(self,a,b): return a+b; class Calculation2: def Multiplication(self,a,b): return a*b; class Derived(Calculation1,Calculation2): def Divide(self,a,b): return a/b; d = Derived() print(d.Summation(10,20)) print(d.Multiplication(10,20)) print(d.Divide(10,20))