.Net Design Patterns Quiz

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Stephanie Young
S
Stephanie Young
Community Contributor
Quizzes Created: 85 | Total Attempts: 71,218
| Attempts: 499 | Questions: 10
Please wait...
Question 1 / 10
0 %
0/100
Score 0/100
1. Which of these design patterns is used to process a list or chain of various types of request?

Explanation

The Chain of Responsibility Design pattern is used to process a list or chain of various types of requests. In this pattern, multiple objects are linked together in a sequence, and each object has the ability to handle the request or pass it on to the next object in the chain. This allows for a flexible and dynamic way of handling requests, where each object in the chain can decide whether to handle the request or delegate it to the next object.

Submit
Please wait...
About This Quiz
.Net Design Patterns Quiz - Quiz

Design patterns provides solutions to problems as regard software design. When designing an application, the best way a programmer can solve any problem that erupts is by using... see moredesign patterns. Click the start button and get started. Good Luck! see less

2. Which of the following behavioural patterns sequentially access the elements of a collection?

Explanation

The correct answer is Iterator. The Iterator pattern provides a way to access the elements of a collection sequentially without exposing its underlying structure. It allows clients to iterate over a collection without knowing the specific implementation details. The Chain of Responsibility, Command, and Interpreter patterns do not specifically deal with the sequential access of elements in a collection.

Submit
3. The following are creational design patterns except:

Explanation

The given question is asking for the design pattern that is not a creational design pattern. The Factory Method, Abstract Factory, and Builder are all examples of creational design patterns as they provide ways to create objects. However, the Adapter design pattern is a structural design pattern, not a creational one. It is used to adapt the interface of one class to another, allowing them to work together.

Submit
4. The behavioural pattern that defines simplified communication between classes is

Explanation

The correct answer is Mediator. The Mediator pattern defines a simplified communication between classes by introducing a mediator object that encapsulates the communication logic between these classes. It promotes loose coupling and reduces dependencies between classes, as they only need to communicate with the mediator instead of directly with each other. This pattern is useful in scenarios where a set of objects need to interact with each other in a controlled and centralized manner.

Submit
5. Which of these design patterns allows an object to alter its behavior when its internal state changes?

Explanation

The State design pattern allows an object to alter its behavior when its internal state changes. This pattern is used when an object needs to change its behavior based on its internal state, and it encapsulates each state into a separate class. The object delegates the behavior to the current state class, and when the state changes, the object's behavior changes accordingly. This pattern promotes loose coupling between the object and its states, making it easier to add or modify states without affecting the object's code.

Submit
6. Which of these is not a structural design pattern? 

Explanation

The Visitor pattern is not a structural design pattern. It is a behavioral design pattern. Structural design patterns deal with the composition of classes and objects to form larger structures, while behavioral design patterns focus on the interaction between objects and how they communicate with each other. The Adapter, Composite, and Proxy patterns are all examples of structural design patterns.

Submit
7. Behavioural patterns include the following except:

Explanation

Behavioural patterns in software design refer to patterns that focus on communication and interaction between objects. The Observer pattern allows objects to notify and update other objects about changes in their state. The State pattern allows an object to change its behavior based on its internal state. The Strategy pattern allows different algorithms or strategies to be used interchangeably within an object. However, the Proxy pattern is not a behavioural pattern. It is a structural pattern that provides a surrogate or placeholder for another object to control access to it.

Submit
8. Which of the following creational design patterns creates a set of related objects or dependent objects?

Explanation

The correct answer is Abstract Factory because the Abstract Factory design pattern is used to create a family of related objects or dependent objects. It provides an interface for creating objects, but allows subclasses to decide which class to instantiate. This pattern is useful when there are multiple families of objects that need to be created and the system should be independent of how these objects are created, composed, and represented.

Submit
9. The design pattern that involves the removal of an algorithm from its host class and putting it in a separate class is

Explanation

The correct answer is the Strategy Design Pattern. This design pattern involves removing an algorithm from its host class and placing it in a separate class. The host class then holds a reference to the strategy class and delegates the algorithm execution to it. This allows for easy swapping of different algorithms at runtime without modifying the host class.

Submit
10. Proxy pattern falls under what design pattern? 

Explanation

The Proxy pattern falls under the Structural design pattern category. This pattern involves creating a proxy object that acts as a substitute for another object, controlling access to it and providing additional functionality if needed. The main purpose of the Proxy pattern is to provide a level of indirection between the client and the real object, allowing for easier control and management of the object's behavior.

Submit
View My Results

Quiz Review Timeline (Updated): Mar 19, 2023 +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 19, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Mar 05, 2018
    Quiz Created by
    Stephanie Young
Cancel
  • All
    All (10)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
Which of these design patterns is used to process a list or chain of...
Which of the following behavioural patterns sequentially access the...
The following are creational design patterns except:
The behavioural pattern that defines simplified communication between...
Which of these design patterns allows an object to alter its behavior...
Which of these is not a structural design pattern? 
Behavioural patterns include the following except:
Which of the following creational design patterns creates a set of...
The design pattern that involves the removal of an algorithm from...
Proxy pattern falls under what design pattern? 
Alert!

Advertisement