
SDA Lab Quiz 3 A & B

Quiz
•
Computers
•
University
•
Medium
Muhammad Abdullah Nasim
Used 2+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the primary purpose of the Singleton pattern?
To ensure a class has only one instance and provide a global point of access to it
To inherit behavior from multiple classes
To instantiate multiple objects of the same type
To allow runtime object creation with different types
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Singleton s1 = Singleton.getInstance();
Singleton s2 = Singleton.getInstance();
System.out.println(s1 == s2);
true
false
Runtime Error
Compilation Error
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the Factory Method pattern mainly used for?
To enforce inheritance
To allow the creation of objects without specifying their concrete classes
To create a single global object
To serialize objects
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following best explains the advantage of Factory Method over direct object instantiation?
Reduces memory consumption
Increases tight coupling
Avoids constructors
Provides flexibility in object creation
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code?
(Factory Method)
Woof
Meow
Runtime Error
None of these
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the main goal of the Composite design pattern?
To simplify condition checking
To treat individual and composite objects uniformly
To avoid using inheritance
To optimize recursion
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Folder
└── File
Which pattern does this represent?
Singleton
Builder
Composite
Factory Method
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
PBO Quiz

Quiz
•
University
10 questions
Time Complexity

Quiz
•
University
15 questions
AWS EC2

Quiz
•
University
14 questions
Introducción a .NET Core

Quiz
•
University
15 questions
Brewing JavaFX Quiz

Quiz
•
University
10 questions
INTRODUCTION TO OOPS

Quiz
•
University
10 questions
7.9 Identifying and Correcting Errors Cambridge IGCSE 0478

Quiz
•
10th Grade - University
10 questions
Unit 1 - Classes and Objects

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

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

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Would you rather...

Quiz
•
KG - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

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

Interactive video
•
4th Grade - University
10 questions
The Constitution, the Articles, and Federalism Crash Course US History

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

Interactive video
•
4th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
16 questions
Water Modeling Activity

Lesson
•
11th Grade - University
10 questions
ACT English prep

Quiz
•
9th Grade - University