Skip to content

This repository introduces Object-Oriented Programming (OOP) in Python, covering Abstraction, Encapsulation, Inheritance, and Polymorphism with practical examples. Ideal for beginners and experienced developers, it helps design modular, scalable, and maintainable Python programs.

License

Notifications You must be signed in to change notification settings

RezaSaadatyar/Object-Oriented-Programming

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Object Oriented Programming (OOP)

The repository introduces OOP in Python, covering key concepts such as Abstraction, Encapsulation, Inheritance, and Polymorphism through practical examples. It serves both beginners and experienced developers, focusing on designing modular, scalable, and maintainable Python programs.

Why This Repository is Useful?

✅ Learn OOP concepts in Python with practical examples
✅ Understand how to structure software projects using OOP
✅ Implement modular and reusable code using classes and objects
✅ Explore best practices for software development with OOP

Contents

Classes and Objects: Defining classes, creating objects, working with instance and class attributes, and using constructors and initializers.
Inheritance: Implementing single and multiple inheritance, overriding methods, and using the super() function.
Polymorphism: Demonstrating method overriding for different behaviors in child classes and defining multiple behaviors for a method.
Abstract Classes and Interfaces: Exploring the concept of abstract classes, using the ABC module, defining abstract methods, and creating and enforcing interfaces.
Encapsulation: Implementing access modifiers (public, protected, private), using getters and setters for private attributes, and working with property decorators and descriptors.
Class and Static Methods: Defining and using class methods and static methods, and understanding the differences between instance methods, class methods, and static methods.
Magic Methods, Operator Overloading, and Dataclass: Understanding magic (dunder) methods, implementing operator overloading, and working with item access methods.
Decorators: Applying decorators to enhance the functionality of classes and methods.

How to Use This Repository?

  1. Clone the repository:
    git clone https://github.com/RezaSaadatyar/Object-Oriented-Programming/oop-python.git
    cd oop-python
  2. Open the Jupyter Notebook:
    jupyter notebook oop.ipynb
  3. Follow the examples and modify the code for your own projects.

License

This project is licensed under the MIT License.

Contributions & Feedback

Feel free to contribute or suggest improvements. Contact me via [email protected] for any discussions!

About

This repository introduces Object-Oriented Programming (OOP) in Python, covering Abstraction, Encapsulation, Inheritance, and Polymorphism with practical examples. Ideal for beginners and experienced developers, it helps design modular, scalable, and maintainable Python programs.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published