Packaging & Namespacing Flashcards

1
Q

What is a maintainable codebase?

A

Having a maintainable code base means we can apply maximum conceptual changes with minimum code changes. In other words, when we need to apply changes to one code unit, we should need to apply the least changes to other code units as possible.

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

What are the advantages of having a maintainable codebase?

A
  • Changes are simpler because they impact on less code;
  • Changes are faster because there will be less code to change;
  • Likelihood of bugs is lower because there is less code changed;
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is Encapsulation?

A

It’s the process of concealing the internal representation and implementation of a class.

That is, it hides the implementation such that the internal structure of a class is free to change without affecting the implementation of the classes that use this particular class.

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

What is coupling?

A

Coupling refers to the degree of interdependence between two code units.

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

What is cohesion?

A

Cohesion refers to the measure of how strongly-related the functions of a module are. Low cohesion refers to modules that have different unrelated responsibilities. High cohesion refers to modules that have functions that are similar in many aspects.

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