Tag: architecture

Questions Related to architecture

  1. Modifiers

  2. Forces

  3. Change Behaviour Stub

  4. Stubs

  5. None of the above


Correct Option: B
  1. Invoker pattern

  2. Double Dispatch pattern

  3. Factory pattern

  4. Intercepting Filter

  5. None of the above


Correct Option: B
  1. Generalization pattern

  2. Encapsulation

  3. Inheritance

  4. Polymorphism

  5. None of the above


Correct Option: D
  1. USE J2EE Architecture

  2. Model-View-Controller

  3. USE PHP and Javascript

  4. ASP.NET Web application


Correct Option: B
  1. Builder

  2. ConcreteBuilder

  3. Producer

  4. Product


Correct Option: C
Explanation:

To solve this question, the user needs to know about the Builder pattern and its participants.

The Builder pattern is a design pattern that separates the construction of a complex object from its representation, allowing the same construction process to create various representations. The Builder pattern involves the following participants:

A. Builder: This participant defines an interface for creating objects.

B. ConcreteBuilder: This participant provides an implementation of the Builder interface.

C. Director: This participant constructs complex objects using the Builder interface.

D. Product: This participant represents the complex object being built.

Now, let's go through each option and explain why it is right or wrong:

A. Builder: This option is correct. The Builder participant is one of the four participants in the Builder pattern. Its role is to define an interface for creating objects.

B. ConcreteBuilder: This option is correct. The ConcreteBuilder participant is one of the four participants in the Builder pattern. Its role is to provide an implementation of the Builder interface.

C. Producer: This option is incorrect. The Producer is not a participant in the Builder pattern. It is not related to the construction of objects.

D. Product: This option is correct. The Product participant is one of the four participants in the Builder pattern. Its role is to represent the complex object being built.

The Answer is: C