Software Development Flashcards
What are SOLID principles?
Single Responsibility Principle
Open/Closed Principle
Liskov Substitution Principle
Interface Segregation Principle
Dependency Inversion Principle
What is the Single Responsibility Principle?
A class should have only one responsibility.
What is the Open/Closed Principle?
A class should be open for extension but closed for modification.
What is the Liskov Substitution Principle?
Objects of a derived class should be able to substitute for objects of its base class.
What is the Interface Segregation Principle?
Client code should not be forced to implement an interface or depend on methods it does not use.
Large interfaces should be split into multiple smaller ones.
What is the Dependency Inversion Principle?
High-level and low-level concrete classes should not depend on each other directly. There should be abstraction between them. Classes should depend on abstract classes or interfaces.
What is the Factory Method pattern?
The factory method design pattern abstracts the process of object creation and allows objects to be created at run-time.