Which of the following is FALSE about duplicate code? Duplicate code is a good programming practice Duplicate code is a source of faults Duplicate code has a negative impact on changeability Duplicate code has a negative impact on maintainability Fixning a fault in the program is a widely used refactoring technique True False Which of the following statements is true? You need to test the code after refactoring to verify that the behavior is not changed You do NOT need to test the code after refactoring because the behavior is not changed After refactoring, no need to test, you need to inspect the code After refactoring, depending on the programming language. In case of Java, no need to test as Java provided an automatic Garbage collection mechanism 6. What can go wrong if you refactor an interface? If an interface becomes a published interface, the interface is being used by code that you cannot find and change. Nothing! In Java, interfaces cannot be refactored The program performance decreases Which of the following classes suffers from the Middle Man bad smell? A class that contains more methods than it should A class that delegates many of its requests to another class A class that only contains data A class that contains less method than it should 8. Which of the following is a symptom of Shotgun Surgery bad smell? Whenever make a change, you have to make a lot of little changes to a lot of different classes. When one module changed in different ways for different reasons When a method is making more use of another class than the one it is in When you have sets of variables that are usually passed together i
Which of the following is FALSE about duplicate code?
- Duplicate code is a good
programming practice - Duplicate code is a source of faults
- Duplicate code has a negative impact on changeability
- Duplicate code has a negative impact on maintainability
- Fixning a fault in the program is a widely used refactoring technique
True
False
- Which of the following statements is true?
You need to test the code after refactoring to verify that the behavior is not changed |
||||||||||||||
You do NOT need to test the code after refactoring because the behavior is not changed |
||||||||||||||
After refactoring, no need to test, you need to inspect the code |
||||||||||||||
After refactoring, depending on the programming language. In case of Java, no need to test as Java provided an automatic Garbage collection
6. What can go wrong if you refactor an interface?
|
- Which of the following classes suffers from the Middle Man bad smell?
A class that contains more methods than it should |
||||||||||||||||||||||||||||||||||||||
A class that delegates many of its requests to another class |
||||||||||||||||||||||||||||||||||||||
A class that only contains data |
||||||||||||||||||||||||||||||||||||||
A class that contains less method than it should
8. Which of the following is a symptom of Shotgun Surgery bad smell?
|
Trending now
This is a popular solution!
Step by step
Solved in 2 steps