Answered step by step
Verified Expert Solution
Link Copied!

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

Qno1 Pair programming is responsible of introducing bad smells in the code. True or False
Qno2 Fixing a fault in the program is a widely used refactoring technique. True or False
Qno3 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.
Qno4 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.
Qno5 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.
Qno6 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.
Qno7 A method is long if it's LoC exceeds 20? True or False
Qno 8 You have a legacy system that consists of 1000 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?
A)The 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
C)Give the task to someone else
D)Pretend 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Management An Organizational Perspective

Authors: Richard T. Watson

1st Edition

0471305340, 978-0471305347

More Books

Students also viewed these Databases questions

Question

What percent of 75,528 is 27,945.36?

Answered: 1 week ago

Question

4. What are the current trends in computer software platforms?

Answered: 1 week ago