Creational Design Patterns . Net_10 June

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 James Richardson
J
James Richardson
Community Contributor
Quizzes Created: 13 | Total Attempts: 11,392
| Attempts: 769 | Questions: 10
Please wait...
Question 1 / 10
0 %
0/100
Score 0/100
1. What is the reason for studying design pattern?

Explanation

Studying design patterns is important because they allow for the reuse of solutions, saving time and effort in the development process. Additionally, patterns help with communication between analysts by providing a common language and understanding of design concepts. Furthermore, patterns give a broader perspective on problem-solving, allowing for more effective and efficient solutions. Therefore, all of the given reasons are valid explanations for studying design patterns.

Submit
Please wait...
About This Quiz
Creational Design Patterns . Net_10 June - Quiz

Explore the essentials of design patterns in. NET with this quiz on June 10. Assess your understanding of their purpose, structure, and application in software development. This quiz... see moreevaluates knowledge on design reuse and correct pattern utilization, crucial for effective software architecture. see less

2.
  1. Which of following patterns is not used to create an object?

Explanation

The Strategy pattern is not used to create an object. The Strategy pattern is a behavioral design pattern that allows selecting an algorithm at runtime. It defines a family of algorithms, encapsulates each one, and makes them interchangeable. It is used to provide different strategies for solving a problem. However, it does not involve the creation of objects itself.

Submit
3. Patterns are the devices that allow programs to share knowledge about their ___

Explanation

Patterns are the devices that allow programs to share knowledge about their design. Design patterns provide solutions to common design problems and enable programmers to create reusable and maintainable code. By using design patterns, programmers can leverage existing knowledge and best practices to improve the overall quality and efficiency of their software designs.

Submit
4. Which of the following are among ten things, which the basic templates of GoF design pattern include?

Explanation

The correct answer is "All of the above" because the basic templates of GoF design patterns include problem, context, and forces. These three elements are essential in understanding and applying design patterns effectively. The problem refers to the specific issue or challenge that the design pattern aims to solve. The context provides the background and environment in which the problem exists. The forces are the constraints and considerations that influence the design decisions. Therefore, all three elements are necessary components of the basic templates of GoF design patterns.

Submit
5. What is the key strategy in the Abstract factory?

Explanation

The key strategy in the Abstract factory is to implement all of the given options. "Find what varies and encapsulate it" refers to identifying the varying parts of an object and encapsulating them into separate classes. "Favour aggregation over inheritance" suggests using composition and object aggregation instead of relying solely on inheritance. "Design to interfaces, not to implementations" emphasizes programming to interfaces rather than concrete implementations, allowing for flexibility and interchangeability. Implementing all of these strategies helps in creating a flexible and maintainable codebase.

Submit
6. Design patterns enables ____ reuse

Explanation

Design patterns enable code reuse.

Submit
7. Which design pattern is also called anti pattern?

Explanation

The Singleton design pattern is often referred to as an anti-pattern because it can introduce global state and tightly couple different parts of the codebase. It can make the code harder to test, maintain, and extend. The use of a Singleton can also hinder parallelism and make it difficult to achieve proper separation of concerns. Therefore, while the Singleton pattern can be useful in certain scenarios, it is generally considered an anti-pattern due to its potential drawbacks.

Submit
8.
  1. Which are NOT the possible errors of using design patterns?

Explanation

The possible errors of using design patterns include superficiality, fit, and misdiagnosis. However, cohesion is not considered an error when using design patterns. Cohesion refers to the degree to which the elements within a module or class belong together and work together towards a common goal. It is a desirable quality in software design and not considered an error.

Submit
9. Design patterns have to be object oriented?

Explanation

Design patterns do not have to be object-oriented. While many design patterns are commonly used in object-oriented programming, there are also design patterns that can be applied in other programming paradigms such as functional programming or procedural programming. Design patterns are general reusable solutions to common problems in software design, and they can be adapted and used in various programming paradigms depending on the specific problem at hand.

Submit
10.
  1. What is the factory implementation in C#?

Explanation

The GetEnumerator() method is the factory implementation in C#. This method is used to create and return an enumerator object, which allows for iterating over a collection of objects. It is commonly used in conjunction with the foreach loop to iterate through elements in a collection. The other options (GetObject(), GetType(), and None of the above) are not related to factory implementation in C#.

Submit
View My Results

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

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

  • Current Version
  • Mar 22, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Jun 06, 2013
    Quiz Created by
    James Richardson
Cancel
  • All
    All (10)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
What is the reason for studying design pattern?
Which of following patterns is not used to create an object?
Patterns are the devices that allow programs to share knowledge about...
Which of the following are among ten things, which the basic templates...
What is the key strategy in the Abstract factory?
Design patterns enables ____ reuse
Which design pattern is also called anti pattern?
Which are NOT the possible errors of using design patterns?
Design patterns have to be object oriented?
What is the factory implementation in C#?
Alert!

Advertisement