Software Engineering Flashcards

1
Q

What are the 5 principles of SOLID

A
Single responsibility
Open-closed
Liskov substitution
Interface segregation
Dependency inversion
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Single responsibility principle

A

SOLID principle described by:

an object should have only a single responsibility.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Open/closed principle

A

SOLID principle described by:

“software entities … should be open for extension, but closed for modification”.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Liskov substitution principle

A

SOLID principle described by:
“objects in a program should be replaceable with instances of their subtypes without altering the correctness of that program”. See also ‘design by contract’.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Interface segregation principle

A

SOLID principle described by:

“many client specific interfaces are better than one general purpose interface.”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Dependency inversion principle

A

SOLID principle described by:
one should “Depend upon Abstractions. Do not depend upon concretions.” Dependency injection is one method of following this principle.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What does GRASP stand for?

A

General Responsibility Assignment Software Patterns (or Principles)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

The different patterns and principles used in GRASP

A
  1. Controller
  2. Creator
  3. Indirection
  4. Information Expert
  5. High Cohesion
  6. Low Coupling
  7. Polymorphism
  8. Protected Variations
  9. Pure Fabrication
How well did you know this?
1
Not at all
2
3
4
5
Perfectly