Skip to content

Commit a80b965

Browse files
committed
update code
1 parent 6975595 commit a80b965

File tree

1 file changed

+13
-24
lines changed

1 file changed

+13
-24
lines changed

Code/oop.ipynb

Lines changed: 13 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -29,29 +29,32 @@
2929
"▪ Methods:<br/> \n",
3030
"$\\;\\;\\;\\;\\;$ Defining methods with def → Functions defined inside a class that operate on the class attributes.<br/> \n",
3131
"$\\;\\;\\;\\;\\;$ Using self to access instance attributes<br/>\n",
32-
"$\\;\\;\\;\\;\\;$ [Link 1](https://www.w3schools.com/python/python_functions.asp)$\\;\\;\\;\\;\\;$ [Link 2](https://www.tutorialspoint.com/difference-between-method-and-function-in-python)$\\;\\;\\;\\;\\;$ [Link 3](https://www.pythonlikeyoumeanit.com/Module4_OOP/Methods.html)<br/>\n",
32+
"$\\;\\;\\;\\;\\;$ [Link 1](https://www.w3schools.com/python/python_functions.asp)$\\;\\;\\;\\;\\;$ [Link 2](https://www.tutorialspoint.com/difference-between-method-and-function-in-python)$\\;\\;\\;\\;\\;$ [Link 3](https://www.pythonlikeyoumeanit.com/Module4_OOP/Methods.html)<br/>\n",
3333
"▪ Accessing and modifying objects<br/>\n",
3434
"▪ Constructors and Initializers<br/>\n",
3535
"$\\;\\;\\;\\;\\;$ Using the `__init__ `method<br/>\n",
3636
"$\\;\\;\\;\\;\\;$ Initializing instance attributes<br/>\n",
3737
"$\\;\\;\\;\\;\\;$ Setting default and custom parameters<br/>\n",
38-
" [Link 1](https://www.w3schools.com/python/python_classes.asp)$\\;\\;\\;\\;\\;$ [Link 2](https://realpython.com/python3-object-oriented-programming/)$\\;\\;\\;\\;\\;$ [Link 3](https://pynative.com/python-classes-and-objects/)$\\;\\;\\;\\;\\;$\n",
38+
" [Link 1](https://www.w3schools.com/python/python_classes.asp)$\\;\\;\\;\\;\\;$ [Link 2](https://realpython.com/python3-object-oriented-programming/)$\\;\\;\\;\\;\\;$ [Link 3](https://pynative.com/python-classes-and-objects/)<br/>\n",
3939
"\n",
4040
"**2. Inheritance**<br/>\n",
4141
"▪ Single Inheritance<br/>\n",
4242
"▪ Multiple Inheritance<br/>\n",
4343
"▪ Overriding methods<br/>\n",
4444
"▪ Using super() to call parent class methods (super().`__init__`)<br/>\n",
45+
"• [Link 1](https://www.w3schools.com/python/python_inheritance.asp)$\\;\\;\\;\\;\\;$ • [Link 2](https://www.tutorialsteacher.com/python/inheritance-in-python)<br/>\n",
4546
"\n",
4647
"**3. Polymorphism**<br/>\n",
4748
"▪ Method overriding for different behaviors in child classes<br/>\n",
4849
"▪ Defining multiple behaviors for a method<br/>\n",
50+
"• [Link 1](https://pynative.com/python-polymorphism/)$\\;\\;\\;\\;\\;$ • [Link 2](https://www.edureka.co/blog/polymorphism-in-python/)$\\;\\;\\;\\;\\;$ • [Link 3](https://www.geeksforgeeks.org/python/polymorphism-in-python/)<br/>\n",
4951
"\n",
5052
"**4. Abstract Classes and Interfaces**<br/>\n",
5153
"▪ Concept of abstract classes<br/>\n",
5254
"▪ Using the abc module<br/>\n",
5355
"▪ Defining abstract methods<br/>\n",
5456
"▪ Creating and enforcing interfaces<br/>\n",
57+
"• [Link 1](https://www.scaler.com/topics/python/data-abstraction-in-python/)$\\;\\;\\;\\;\\;$ • [Link 2](https://www.educba.com/abstraction-in-python/)$\\;\\;\\;\\;\\;$ • [Link 3](https://www.askpython.com/python/oops/abstraction-in-python)<br/>\n",
5558
"\n",
5659
"**5. Encapsulation**<br/>\n",
5760
"▪ Access Modifiers:<br/>\n",
@@ -61,16 +64,14 @@
6164
"▪ Using Getters and Setters for private attributes<br/>\n",
6265
"▪ Property decorators (@property) for better encapsulation<br/>\n",
6366
"▪ Descriptor using get, set, delete, and set_name<br/>\n",
64-
"[Link 1](https://www.geeksforgeeks.org/python/encapsulation-in-python/)<br/>\n",
65-
"[Link 2](https://www.askpython.com/python/oops/encapsulation-in-python)<br/>\n",
66-
"[Link 3](https://www.scaler.com/topics/python/encapsulation-in-python/)<br/>\n",
67-
"[Link 4]()<br/>\n",
67+
"• [Link 1](https://www.geeksforgeeks.org/python/encapsulation-in-python/)$\\;\\;\\;\\;\\;$ • [Link 2](https://www.scaler.com/topics/python/encapsulation-in-python/)$\\;\\;\\;\\;\\;$ • [Link 3](https://www.askpython.com/python/oops/encapsulation-in-python)$\\;\\;\\;\\;\\;$ • [Link 4](https://favtutor.com/blogs/python-private-methods)$\\;\\;\\;\\;\\;$ • [Link 5](https://codefather.tech/blog/private-methods-python/)$\\;\\;\\;\\;\\;$ • [Link 6](https://www.educba.com/python-private-method/) $\\;\\;\\;\\;\\;$ • [Link 7](https://www.tutorialsteacher.com/python/public-private-protected-modifiers)<br/>\n",
6868
"\n",
6969
"**6. Class and Static Methods**<br/>\n",
7070
"▪ Defining Class Methods with @classmethod<br/>\n",
7171
"▪ Defining Static Methods with @staticmethod<br/>\n",
7272
"▪ Difference between Instance Methods, Class Methods, and Static Methods<br/>\n",
7373
"▪ Using cls for class-related operations<br/>\n",
74+
"• [Link 1](https://codefather.tech/blog/static-method-class-method-python/)$\\;\\;\\;\\;\\;$ • [Link 2](https://www.digitalocean.com/community/tutorials/python-static-method)$\\;\\;\\;\\;\\;$ • [Link 3](https://linuxhint.com/) $\\;\\;\\;\\;\\;$ • [Link 4](https://realpython.com/instance-class-and-static-methods-demystified/)<br/>\n",
7475
"\n",
7576
"**7. Magic Methods, Operator Overloading & dataclass**<br/>\n",
7677
"▪ Understanding magic methods (Dunder methods)<br/>\n",
@@ -80,25 +81,13 @@
8081
"$\\;\\;\\;\\;\\;\\;$ Arithmetic operation methods (`__add__`, `__sub__`, etc.)<br/>\n",
8182
"$\\;\\;\\;\\;\\;\\;$ Item access methods: `__getitem__`, `__setitem__`<br/>\n",
8283
"$\\;\\;\\;\\;\\;\\;$ Customizing object behavior with magic methods<br/>\n",
84+
"• [Link 1](https://www.tutorialsteacher.com/python/magic-methods-in-python)$\\;\\;\\;\\;\\;$ • [Link 2](https://rszalski.github.io/magicmethods/)<br/>\n",
8385
"\n",
84-
"**8. Decorator**"
85-
]
86-
},
87-
{
88-
"cell_type": "markdown",
89-
"metadata": {},
90-
"source": [
91-
"[1](https://pynative.com/python-classes-and-objects/)<br/>\n",
92-
"[2](https://realpython.com/python3-object-oriented-programming/)<br/>\n",
93-
"[3](https://www.w3schools.com/python/python_classes.asp)<br/>\n",
94-
"[4](https://rszalski.github.io/magicmethods/)<br/>\n",
95-
"[5](https://www.tutorialsteacher.com/python/magic-methods-in-python)<br/>\n",
96-
"[6](https://www.pythonlikeyoumeanit.com/Module4_OOP/Methods.html)<br/>\n",
97-
"[7](https://www.tutorialspoint.com/difference-between-method-and-function-in-python)<br/>\n",
98-
"[8](https://www.w3schools.com/python/python_functions.asp)<br/>\n",
99-
"\n",
100-
"[1](https://www.tutorialsteacher.com/python/inheritance-in-python)<br/>\n",
101-
"[2](https://www.w3schools.com/python/python_inheritance.asp)<br/>\n"
86+
"**8. Types of Methods in a Class**<br/>\n",
87+
"▪ Decorators<br/>\n",
88+
"• [Link 1](https://www.freecodecamp.org/news/python-decorators-explained-with-examples/)$\\;\\;\\;\\;\\;$ • [Link 2](https://python-course.eu/advanced-python/decorators-decoration.php)$\\;\\;\\;\\;\\;$ • [Link 3](https://www.sitepoint.com/understanding-python-decorators/)<br/>\n",
89+
"▪ Property<br/>\n",
90+
"• [Link 1](https://www.geeksforgeeks.org/python/python-property-function/)$\\;\\;\\;\\;\\;$ • [Link 2](https://www.tutorialsteacher.com/python/property-function)$\\;\\;\\;\\;\\;$ • [Link 3](https://www.freecodecamp.org/news/python-property-decorator/) $\\;\\;\\;\\;\\;$ • [Link 4](https://www.scaler.com/topics/python/python-property/)<br/>"
10291
]
10392
},
10493
{

0 commit comments

Comments
 (0)