Week 10 Flashcards

1
Q

Design Concepts for good internal quality

A

Modularity - Each component addresses a single part of the functionality. Advantage: TARC

Functional Independence - components should have minimal dependence on other components. Advantage:STARC

Abstraction - use other components with minimal knowledge of the detail of their implementation. Advantage: SR

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

Difference Factory Pattern vs Factory Method

A
In the Factory Method pattern, a subclass implements a “factory method” that returns an
implementation of a dependency that the parent class can then use without having to know the
specific type. -> D
BTW, Option C is similar to what’s called the “Factory” pattern but is not the same as the
“Factory Method” pattern that we saw in this class.
C. Define a static method that returns a subclass of Animal based on the arguments that are
passed to that method.
D. Define a method that subclasses of Person can override in order to return the desired
subclass of Animal.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly