SlideShare a Scribd company logo
1 of 13
Download to read offline
SOLID Principles
Presented by,
Aayushi Shah
Janvi Shah
Kaushik Sathvara
Anil Soni
https://htree.plus/
Introduction
Philosophy
Don’t repeat yourself
Keep it simple and stupid
You aren’t gonna need it
https://htree.plus/
Single Responsibility
Do you expect, your ide will code for you?
https://htree.plus/
Open-Closed
Operating System
https://htree.plus/
What is Liskov substitution principle?
Child classes should not break the parent
class's type definitions.
Liskov SubstitutionPrinciple
https://htree.plus/
What is breaking the rule of Liskov principle?
In below class diagram we cannot withdraw from kids account and that will create an exception in
superclass withdrawal method. That is a breach in Liskov Substitution Principle.
❌ Withdraw method in the kids account class is a breach
of LSP
✔️ Handling Non withdrawable behaviour by introducing two
new classes inheriting base class.
https://htree.plus/
Interface-segregation principle (ISP) states that :
“Client should not be forced to depend on methods it does not use.”
Why ISP is needed?
● Fat Interface
Interface Segregation Principle
https://htree.plus/
What ISP suggests?
● Role Interfaces
Advantages :
● Small, highly cohesive and
“Solid” classes
● increases readability and maintainability
https://htree.plus/
Dependency Inversion Principle
Dependency Inversion Principle states that:
“Entities must depend on abstractions not on concretions”
What does it says?
● High level modules
● Low level modules
https://htree.plus/
Example:
https://htree.plus/
Conclusion:
By applying these 5 principles that make the SOLID acronym, we get to benefit from a
reusable, maintainable, scalable and easy testable codebase.
https://htree.plus/
References
● https://scotch.io/bar-talk/s-o-l-i-d-the-first-five-principles-of-object-oriented-design
● https://medium.com/@trekhleb/solid-principles-around-you-6db2f0e12139
● https://fi.ort.edu.uy/innovaportal/file/2032/1/design_principles.pdf(4-16)
● https://blog.bitsrc.io/solid-principles-every-developer-should-know-b3bfa96bb688
● https://itnext.io/solid-principles-explanation-and-examples-715b975dcad4
● https://docs.google.com/a/cleancoder.com/viewer?a=v&pid=explorer&chrome=true&srcid=0BwhCYaYDn8E
gOTViYjJhYzMtMzYxMC00MzFjLWJjMzYtOGJiMDc5N2JkYmJi&hl=en
● https://www.baeldung.com/solid-principles
● https://hackernoon.com/solid-principles-simple-and-easy-explanation-f57d86c47a7f
https://htree.plus/
THANK YOU
https://htree.plus/

More Related Content

Recently uploaded

Triangulation survey (Basic Mine Surveying)_MI10412MI.pptx
Triangulation survey (Basic Mine Surveying)_MI10412MI.pptxTriangulation survey (Basic Mine Surveying)_MI10412MI.pptx
Triangulation survey (Basic Mine Surveying)_MI10412MI.pptxRomil Mishra
 
input buffering in lexical analysis in CD
input buffering in lexical analysis in CDinput buffering in lexical analysis in CD
input buffering in lexical analysis in CDHeadOfDepartmentComp1
 
Network Enhancements on BitVisor for BitVisor Summit 12
Network Enhancements on BitVisor for BitVisor Summit 12Network Enhancements on BitVisor for BitVisor Summit 12
Network Enhancements on BitVisor for BitVisor Summit 12cjchen22
 
A brief look at visionOS - How to develop app on Apple's Vision Pro
A brief look at visionOS - How to develop app on Apple's Vision ProA brief look at visionOS - How to develop app on Apple's Vision Pro
A brief look at visionOS - How to develop app on Apple's Vision ProRay Yuan Liu
 
Cost estimation approach: FP to COCOMO scenario based question
Cost estimation approach: FP to COCOMO scenario based questionCost estimation approach: FP to COCOMO scenario based question
Cost estimation approach: FP to COCOMO scenario based questionSneha Padhiar
 
maths mini project ( applictions of quadratic forms and SVD ).ppt
maths mini project ( applictions of quadratic forms and SVD ).pptmaths mini project ( applictions of quadratic forms and SVD ).ppt
maths mini project ( applictions of quadratic forms and SVD ).pptManavPatane
 
Design and Analysis of Algorithms Lecture Notes
Design and Analysis of Algorithms Lecture NotesDesign and Analysis of Algorithms Lecture Notes
Design and Analysis of Algorithms Lecture NotesSreedhar Chowdam
 
Understanding Process Safety Incidents in the Oil and Gas Industry
Understanding Process Safety Incidents in the Oil and Gas IndustryUnderstanding Process Safety Incidents in the Oil and Gas Industry
Understanding Process Safety Incidents in the Oil and Gas Industrysoginsider
 
Introduction to Machine Learning Part1.pptx
Introduction to Machine Learning Part1.pptxIntroduction to Machine Learning Part1.pptx
Introduction to Machine Learning Part1.pptxPavan Mohan Neelamraju
 
Introduction of Object Oriented Programming Language using Java. .pptx
Introduction of Object Oriented Programming Language using Java. .pptxIntroduction of Object Oriented Programming Language using Java. .pptx
Introduction of Object Oriented Programming Language using Java. .pptxPoonam60376
 
AI Powered Ecover creator that creates everything that you want
AI Powered Ecover creator that creates everything that you wantAI Powered Ecover creator that creates everything that you want
AI Powered Ecover creator that creates everything that you wantsuja868966
 
Overview of IS 16700:2023 (by priyansh verma)
Overview of IS 16700:2023 (by priyansh verma)Overview of IS 16700:2023 (by priyansh verma)
Overview of IS 16700:2023 (by priyansh verma)Priyansh
 
Introduction to Artificial Intelligence: Intelligent Agents, State Space Sear...
Introduction to Artificial Intelligence: Intelligent Agents, State Space Sear...Introduction to Artificial Intelligence: Intelligent Agents, State Space Sear...
Introduction to Artificial Intelligence: Intelligent Agents, State Space Sear...shreenathji26
 
SOFTWARE ESTIMATION COCOMO AND FP CALCULATION
SOFTWARE ESTIMATION COCOMO AND FP CALCULATIONSOFTWARE ESTIMATION COCOMO AND FP CALCULATION
SOFTWARE ESTIMATION COCOMO AND FP CALCULATIONSneha Padhiar
 
Road Development plans of India-Transportation Engineering
Road Development plans of India-Transportation EngineeringRoad Development plans of India-Transportation Engineering
Road Development plans of India-Transportation EngineeringSayli Madhale
 
Defining the Clouds for entriprises.pptx
Defining the Clouds for entriprises.pptxDefining the Clouds for entriprises.pptx
Defining the Clouds for entriprises.pptxAshwiniTodkar4
 
22CYT12 & Chemistry for Computer Systems_Unit-II-Corrosion & its Control Meth...
22CYT12 & Chemistry for Computer Systems_Unit-II-Corrosion & its Control Meth...22CYT12 & Chemistry for Computer Systems_Unit-II-Corrosion & its Control Meth...
22CYT12 & Chemistry for Computer Systems_Unit-II-Corrosion & its Control Meth...KrishnaveniKrishnara1
 

Recently uploaded (20)

Triangulation survey (Basic Mine Surveying)_MI10412MI.pptx
Triangulation survey (Basic Mine Surveying)_MI10412MI.pptxTriangulation survey (Basic Mine Surveying)_MI10412MI.pptx
Triangulation survey (Basic Mine Surveying)_MI10412MI.pptx
 
input buffering in lexical analysis in CD
input buffering in lexical analysis in CDinput buffering in lexical analysis in CD
input buffering in lexical analysis in CD
 
Network Enhancements on BitVisor for BitVisor Summit 12
Network Enhancements on BitVisor for BitVisor Summit 12Network Enhancements on BitVisor for BitVisor Summit 12
Network Enhancements on BitVisor for BitVisor Summit 12
 
A brief look at visionOS - How to develop app on Apple's Vision Pro
A brief look at visionOS - How to develop app on Apple's Vision ProA brief look at visionOS - How to develop app on Apple's Vision Pro
A brief look at visionOS - How to develop app on Apple's Vision Pro
 
Cost estimation approach: FP to COCOMO scenario based question
Cost estimation approach: FP to COCOMO scenario based questionCost estimation approach: FP to COCOMO scenario based question
Cost estimation approach: FP to COCOMO scenario based question
 
maths mini project ( applictions of quadratic forms and SVD ).ppt
maths mini project ( applictions of quadratic forms and SVD ).pptmaths mini project ( applictions of quadratic forms and SVD ).ppt
maths mini project ( applictions of quadratic forms and SVD ).ppt
 
Design and Analysis of Algorithms Lecture Notes
Design and Analysis of Algorithms Lecture NotesDesign and Analysis of Algorithms Lecture Notes
Design and Analysis of Algorithms Lecture Notes
 
Understanding Process Safety Incidents in the Oil and Gas Industry
Understanding Process Safety Incidents in the Oil and Gas IndustryUnderstanding Process Safety Incidents in the Oil and Gas Industry
Understanding Process Safety Incidents in the Oil and Gas Industry
 
Versatile Engineering Construction Firms
Versatile Engineering Construction FirmsVersatile Engineering Construction Firms
Versatile Engineering Construction Firms
 
Introduction to Machine Learning Part1.pptx
Introduction to Machine Learning Part1.pptxIntroduction to Machine Learning Part1.pptx
Introduction to Machine Learning Part1.pptx
 
Neometrix Optical Balloon Theodolite.pptx
Neometrix Optical Balloon Theodolite.pptxNeometrix Optical Balloon Theodolite.pptx
Neometrix Optical Balloon Theodolite.pptx
 
Introduction of Object Oriented Programming Language using Java. .pptx
Introduction of Object Oriented Programming Language using Java. .pptxIntroduction of Object Oriented Programming Language using Java. .pptx
Introduction of Object Oriented Programming Language using Java. .pptx
 
AI Powered Ecover creator that creates everything that you want
AI Powered Ecover creator that creates everything that you wantAI Powered Ecover creator that creates everything that you want
AI Powered Ecover creator that creates everything that you want
 
Overview of IS 16700:2023 (by priyansh verma)
Overview of IS 16700:2023 (by priyansh verma)Overview of IS 16700:2023 (by priyansh verma)
Overview of IS 16700:2023 (by priyansh verma)
 
ASME-B31.4-2019-estandar para diseño de ductos
ASME-B31.4-2019-estandar para diseño de ductosASME-B31.4-2019-estandar para diseño de ductos
ASME-B31.4-2019-estandar para diseño de ductos
 
Introduction to Artificial Intelligence: Intelligent Agents, State Space Sear...
Introduction to Artificial Intelligence: Intelligent Agents, State Space Sear...Introduction to Artificial Intelligence: Intelligent Agents, State Space Sear...
Introduction to Artificial Intelligence: Intelligent Agents, State Space Sear...
 
SOFTWARE ESTIMATION COCOMO AND FP CALCULATION
SOFTWARE ESTIMATION COCOMO AND FP CALCULATIONSOFTWARE ESTIMATION COCOMO AND FP CALCULATION
SOFTWARE ESTIMATION COCOMO AND FP CALCULATION
 
Road Development plans of India-Transportation Engineering
Road Development plans of India-Transportation EngineeringRoad Development plans of India-Transportation Engineering
Road Development plans of India-Transportation Engineering
 
Defining the Clouds for entriprises.pptx
Defining the Clouds for entriprises.pptxDefining the Clouds for entriprises.pptx
Defining the Clouds for entriprises.pptx
 
22CYT12 & Chemistry for Computer Systems_Unit-II-Corrosion & its Control Meth...
22CYT12 & Chemistry for Computer Systems_Unit-II-Corrosion & its Control Meth...22CYT12 & Chemistry for Computer Systems_Unit-II-Corrosion & its Control Meth...
22CYT12 & Chemistry for Computer Systems_Unit-II-Corrosion & its Control Meth...
 

SOLID Principles