Skip to content

sumanengg/oops_in_python

Repository files navigation

Object Oriented Programming in Python

This file contains basic and advanced about Object Oriented Programming in Python. Some of the below concepts has been discussed -->

  1. Object and Classes
  2. Encapsulation
  3. Inheritence
  4. Abstruct Class In # main.py file , you will get most of the things .
  1. SOLID Principles

    • Single Responsibility Principle (SRP): A class should have one and only one reason to change.
    • Open/Closed Principle (OCP): Software entities should be open for extension but closed for modification.
    • Liskov Substitution Principle (LSP): Derived classes should be substitutable for their base classes.
    • Interface Segregation Principle (ISP): Clients should not be forced to depend on methods they do not use.
    • Dependency Inversion Principle (DIP): High-level modules should not depend on low-level modules; both should depend on abstractions.
  2. Design Patterns

    • Singleton Pattern: Ensures a class has only one instance and provides a global point of access to it. Both metaclass-based and __new__-based implementations are demonstrated.
    • Strategy Pattern: Enables selecting an algorithm's behavior at runtime. Examples include different shipping cost strategies based on flat rate and weight-based calculations.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages