Design Principles Flashcards

1
Q

What does SOLID stand for?

A
  • Single Responsibility Principle
  • Open/Closed Principle
  • Liskov Substitution Principle
  • Interface Segregation Principle
  • Dependency Inversion Principle
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Summarize ‘S’

A
  • Every class does one thing

- Responsibility is encapsulated by the class

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

Summarize ‘O’

A
  • Open for extension
  • Closed for modification
  • Extend the class rather than changing it
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Summarize ‘L’

A
  • Subtypes should be able to act as substitutes of supertypes without any additional modification
  • (ie If S is a subtype of T, then S can be used in place of T without throwing any syntax errors)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Summarize ‘I’

A

-Make many specific interfaces for clients so that they don’t need to deal with information irrelevant to them

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

Summarize ‘D’

A
  • Add a layer of abstraction between high and low level classes
  • Allows us to change both high and low level classes without having to change the other
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Difference between Architecture and Design

A
  • Design = low-level code decisions/classes, methods

- Architecture = choice of technologies

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

Which is more important between architecture and design, and why?

A
  • Architecture
  • Architecture choices guide discussion of solutions
  • Architecture allows for review
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What does NFR stand for, and what are common examples?

A
  • Non-functional requirements
  • System qualities that can’t be expressed as features
  • Performance, usability, security, availability, robustness, etc.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What issues do successful architectures address?

A
  • Pick the best structure for functional/non-functional requirements
  • Pick the best structure to ensure we can build the system given
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What does the overall cost of a system depend on?

A
  • Cost of production/debugging

- Cost of maintenance

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

What are the two types of complexity? What are the differences?

A
  • Inter-module and intra-module complexity
  • Intra = complexity within one module
  • Inter = complexity between modules
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Name types of cohesion from worst to best (Hint: CLITPACIFIER THANKS @ARKON)

A
  • Coincidental
  • Logical
  • Temporal
  • Procedural
  • Communicational
  • Sequential
  • Functional
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Name the summarized points of design principles

A
  • Decomposition
  • Information hiding
  • Minimize coupling
  • Maximize Cohesion
  • Extensibility
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is coincidental cohesion?

A

Literally no reason for the two things to be in the same routine.

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

What is logical cohesion?

A

Similar things but should still be kept separate

17
Q

What is temporal cohesion?

A

Things happen sequentially but still should not be kept together

18
Q

What is procedural cohesion?

A

Two operations are together because they are in the same loop/decision process

19
Q

What is communicational cohesion?

A

Procedures that access the same data are kept together

20
Q

What is sequential cohesion?

A

Procedures that are the next logical step in the sequence

21
Q

What is functional cohesion?

A

Procedures kept together as they both have the same function.

22
Q

What is an embedded system?

A

Software system embedded within a larger system that is not intended for computation