
Understanding Code Smells in Software
Quiz
•
Computers
•
University
•
Practice Problem
•
Easy
Romualdo Bautista
Used 3+ times
FREE Resource
Enhance your content in a minute
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
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
19 questions
DSA Quest 1.0
Quiz
•
University
10 questions
Lourdes Amaranta Ayala Gracia
Quiz
•
8th Grade - University
20 questions
Quiz #1 RStudio
Quiz
•
University
16 questions
W6_BIS
Quiz
•
University
20 questions
DreamWeaver CS6
Quiz
•
University
10 questions
CHAPTER 1: COMPUTER SECURITY REVIEW
Quiz
•
University
13 questions
Chap 1: What is a program made of?
Quiz
•
University
10 questions
Introduction to AI - Healthcare & Business
Quiz
•
University - Professi...
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
