Mind map
Python OOP(Object Orianted Programming)
Map content
Python OOP(Object Orianted Programming)
Every thing in Pyhton belongs to a specific class .Like (int class).and we can creat our own class usin: class ClassName()
In this class we define some functions that will be executed if we call them as attributes of the onject that belongs on this new created class
- to execute a function in the class use: ObjectName=ClassName() ObjectName.functionName()
every function defined in the class take at less 1 argument called:self. that self is represinting the Object of ths class
- the function can have some attributes we write: self.AttributeName=an argument or something else
Containership
- It's a way that allows a class to inharites the Methods of another class
- we define the name of the class that its Methods will be inherited by the second class,we define it as a value of a variable in the second class.so in that way works the Containership
- It's a way that allows a class to inharites the Methods of another class
Inharitance
- to inharite the Methods of a class we use : class NewClassName(OldClassName):
- in the second class we should add super().__init__()method that allows us to access to the Methods of the first class
- The Multi-Level inharitance means that every class can inharites the Methods of the previous class whatever the number of class
- The Multiple inharitance means that a class can inharites the Method of different class we write: class NewClassName(class_1,class_2.....)
- The Multi-Level inharitance means that every class can inharites the Methods of the previous class whatever the number of class
- in the second class we should add super().__init__()method that allows us to access to the Methods of the first class
- to inharite the Methods of a class we use : class NewClassName(OldClassName):
Information
- Description
- Mind Map on Python OOP(Object Orianted Programming), created by Briache Issam on 17/08/2021.
- Created by
- Briache Issam · Aug 2021
- Updated
- Aug 20, 2021
- Views
- 1
- Rating