Quiz 2: CS603P - Software Architecture and Design (Practical) (Weekly Lab Quiz 8)
1. Pick the correct option for step “2” in the following Java code fragment:
- Correct Answer:
A = (double) 5 / 3 * B;
2. One of the key advantages of Extract Method type of refactoring is that it provides ______________.
- Correct Answer:
Less code duplication
3. __________ shows a certain structure in the code that represents a violation of fundamental design principles and may negatively impact design quality.
- Correct Answer:
Code smell
4. Extract method type of code refactoring helps to ___________ complexity, while ___________ the overall readability of the code.
- Correct Answer:
Decrease, Increasing
5. ___________ Refactoring helps to separate and group a certain code fragment, whereas the old code is substituted with just a call to the method.
- Correct Answer:
Extract Method