SOLID Design Principles - Identifying From Code

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/5

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

6 Terms

1
New cards

Single Responsibility Principle

Look for classes with methods addressing different concerns

2
New cards

Open/Closed Principle

Identify code that requires modifying existing method implementations to add new functionality instead of extending through inheritance or composition.

3
New cards

Liskov Substitution Principle

Watch for subclasses that override methods in ways that change expected behavior, throw unexpected exceptions, or break contracts established by the parent class.

4
New cards

Interface Segregation Principle

Spot large interfaces with methods that aren't all used by each implementing class, forcing classes to implement methods they don't need.

5
New cards

Dependency Inversion Principle

Look for high-level modules directly instantiating or depending on concrete low-level modules rather than depending on abstractions/interfaces.

6
New cards

Law of Demeter

Notice method chains accessing distant objects (like object.getX().getY().getZ()) rather than talking only to immediate collaborators.