In the name of ALLAH, the Most Beneficent, the Most Merciful

CS603P Weekly Lab Quiz 8 Fall 2024

CS603P Weekly Lab Quiz 8 Fall 2024

 

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:

java
1. public double A = 0.0, B = 0.0; 2. ______________ 3. System.out.println("Value returned by A is given by, A = " + A);
  • 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
Post a Comment (0)
Previous Post Next Post
z
//1