Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Qno 1 Pair programming is responsible of introducing bad smells in the code. True or False Qno 2 Fixing a fault in the program is
Qno Pair programming is responsible of introducing bad smells in the code. True or False
Qno Fixing a fault in the program is a widely used refactoring technique. True or False
Qno Which of the following classes suffers from the Middle Man bad smell?
A A class that contains more methods than it should.
B A class that delegates many of its requests to another class.
C A class that contains less method than it should.
D A class that only contains data.
Qno Which of the following is a symptom of Shotgun Surgery bad smell?
A Whenever make a change, you have to make a lot of little changes to a lot of different classes.
B When one module changed in different ways for different reasons.
C When a method is making more use of another class than the one it is in
D When you have sets of variables that are usually passed together in multiple places.
Qno In OOP, what can you say about a method that requires a lot of parameters?
A Sign of high modularity.
B Probably the method is in the wrong class as the method is using a lot of inputs from the outside.
C Having methods with long parameter list is the norm in OOP.
D The method is doing a critical task, which explains why it needs all these parameters.
Qno 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.
Qno A method is long if it's LoC exceeds True or False
Qno You have a legacy system that consists of LoC, the code is poorly commented, messed up and contains a lot of poor design and implementation decision. The only thing that is clear is what the code is doing. You are asked to refactor the code, what should you do
AThe easiest fastest path to take is to write a new version of the code, you know what the code is doing, design and implement a new solution.
B Do what you are asked to do refactor it It's a typical refactoring scenario
CGive the task to someone else
DPretend that you refactored it but don't because you can't refactor a code that you don't understand. Just add few comments here and there!
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started