C# Mastery Hub
Home
Challenges
Discussion
Lessons
Core Topics
C# Fundamentals
Console Applications
Classes & OOP
Windows Forms
ASP.NET Core
SQL Server
VS & SQL Connection
RDLC Reports
.NET MAUI
Getting Started
Getting Started
Website Development
SEO Guide
Security
Project Workflow
Extra Topics
Cloud & Deployment
AWS Cloud
Deployment
About
Contact
Test Your Knowledge
Extra Topics - Lesson 3: Design Patterns Quiz
Answer all questions to test your understanding
1
What is the Singleton pattern?
A pattern that ensures only one instance of a class exists
A pattern that creates multiple instances
A pattern for database access
A pattern for UI design
2
What is the purpose of the Factory pattern?
To create objects without specifying the exact class
To destroy objects
To manage object lifecycle
To optimize performance
3
What is the Repository pattern used for?
To separate data access logic from business logic
To store configuration
To manage user sessions
To handle errors
4
What is Dependency Injection?
A pattern where objects receive their dependencies from an external source
A pattern where objects create their own dependencies
A pattern for database access
A pattern for UI design
5
What is the Strategy pattern?
A pattern that allows swapping behavior at runtime
A pattern for database access
A pattern for UI design
A pattern for error handling
6
Which pattern is commonly used with Dependency Injection?
Singleton
Factory
Repository
All of the above
Submit Quiz