
Understanding Code Smells in Software

Quiz
•
Computers
•
University
•
Easy
Romualdo Bautista
Used 3+ times
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a "code smell" in software development?
A syntax error in the code
A security vulnerability in the system
An indicator of a deeper problem in the codebase
A runtime exception
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a common cause of "Duplicate Code" smell?
Using polymorphism to extend functionality
Copying and pasting the same logic in multiple places
Using inheritance to share behavior
Applying encapsulation principles
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the recommended approach to eliminate "Long Methods"?
Increase the number of parameters to make the method more flexible
Split the method into smaller, single-responsibility methods
Use global variables to manage method complexity
Store all logic in a single utility function
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a characteristic of "Shotgun Surgery"?
One class has too many responsibilities
Changing one functionality requires modifying multiple classes
A class inherits unnecessary methods from a parent class
A class contains too many instance variables
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How can "Feature Envy" be resolved?
Move the method to the class that contains the data it heavily interacts with
Create additional helper methods to access the required data
Use global variables to reduce dependency on specific classes
Convert the method into a static utility function
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the primary issue with "Long Parameter Lists"?
They make it difficult to call the method correctly
They improve code readability
They enhance encapsulation
They reduce code duplication
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which principle helps avoid "Divergent Change"?
Separation of Concerns
Law of Demeter
DRY (Don't Repeat Yourself)
Singleton Pattern
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
The OOP Quiz

Quiz
•
University
20 questions
Behavioral Design Patterns

Quiz
•
University
18 questions
JQuery Quiz

Quiz
•
University
20 questions
Web Development

Quiz
•
7th Grade - University
15 questions
CS 2nd Semester Mid-Term

Quiz
•
10th Grade - University
20 questions
JAVA Basics Quiz

Quiz
•
University
10 questions
Inheritance Quiz

Quiz
•
2nd Grade - University
15 questions
c# mid test

Quiz
•
University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University