
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
15 questions
Java Programming

Quiz
•
University
20 questions
Classes Relationships in Java Programming

Quiz
•
University
20 questions
Encapsulation C++

Quiz
•
University
10 questions
Object Oriented Programming(Chapter 1)

Quiz
•
University
10 questions
Java quiz based on inheritance

Quiz
•
University
20 questions
TKinter GUIs

Quiz
•
University
20 questions
Fundamentos JAVA

Quiz
•
University
11 questions
Review of OOPs Java Quiz1

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms

Quiz
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
15 questions
Properties of Equality

Quiz
•
8th Grade - University
38 questions
WH - Unit 3 Exam Review*

Quiz
•
10th Grade - University
21 questions
Advise vs. Advice

Quiz
•
6th Grade - University
12 questions
Reading a ruler!

Quiz
•
9th Grade - University