Software Design Patterns and Architecture

Test your knowledge of software design patterns including creational, structural, and behavioral patterns, along with fundamental software architecture concepts like MVC and data access layers.

20 Questions Published

Questions

Question 1 Multiple Choice (Multiple Answers)

In a data center hosting environment, before a web request is received by the Web Server, which components will first receive data packets of an end-user web request

  1. Database Server
  2. Application Server
  3. Firewall
  4. Internet Router
Question 2 Multiple Choice (Single Answer)

An enterprise need to create an Web application in such a way that each parts can be easily modified individually.

  1. USE J2EE Architecture
  2. Model-View-Controller
  3. USE PHP and Javascript
  4. ASP.NET Web application
Question 3 Multiple Choice (Single Answer)

A Visitor Design pattern is

  1. Intercepting Filter
  2. Factory pattern
  3. Invoker pattern
  4. Double Dispatch pattern
  5. None of the above
Question 4 Multiple Choice (Single Answer)

Need to create a class, which will return the same instance whenever requested

  1. Singleton pattern
  2. One Instance pattern
  3. No such class be formed
  4. Static classes are one instance classess
  5. None of the above
Question 5 Multiple Choice (Single Answer)

Notify changes happened in one class to all it's dependent class

  1. Observer pattern
  2. DataAccess pattern
  3. Publisher Pattern
  4. Subscriber Pattern
  5. None of the above
Question 6 Multiple Choice (Single Answer)

You want to encapsulate data access and manipulation in a separate layer.

  1. Encapsulation
  2. Polymorphism
  3. Inheritance
  4. Data Access object
  5. None of the above
Question 7 Multiple Choice (Single Answer)

What pattern does this code have implemented

  1. No pattern could be identified
  2. Polymorphism
  3. Facade pattern
  4. Visitor pattern
  5. Observer pattern
Question 8 Multiple Choice (Single Answer)

Design a shopping web application, which on a query will return arbitarily more number of records. But the requirement is to display only 10 records maximum per page. Also, you are not supposed to execute the same query to fetch the next result set. Also, user should be able to navigate to all the search results back & forth. So, what type of design pattern will be used?

  1. Observer Pattern
  2. Intercepting Filter
  3. Iterator pattern
  4. Value List Iterator pattern
  5. Facade pattern
Question 9 Multiple Choice (Single Answer)

Implementation details of creating different object should not be exposed out. What kind of class will help to achive this?

  1. Facade pattern
  2. Specialization pattern
  3. Value List Iterator pattern
  4. Factory pattern
  5. None of the above
Question 10 Multiple Choice (Single Answer)

You are required to write a class which should behave in the similar way as another class in the system. It should have all the methods and properties as of the other class and should have ability to modify the operations of the methods defined in the main class

  1. Inheritance pattern
  2. Generalization pattern
  3. Specialization pattern
  4. Implementation pattern
  5. None of the above
Question 11 Multiple Choice (Single Answer)

You are not allowed to expose the internal representations of your complex collection / array data type. How do you to fetch elements one after another?

  1. Looper pattern
  2. Visitor pattern
  3. DataAccess pattern
  4. Iterator pattern
  5. None of the above
Question 12 Multiple Choice (Single Answer)

You need to add few data to the request object once the request is submited to the server.

  1. Insertion pattern
  2. Modifer Pattern
  3. No Such operation can be done once the web request is submited
  4. Intercepting Filter
  5. None of the above
Question 13 Multiple Choice (Single Answer)

The user is submiting a secure form with authentication details. The username & password sent in via form should be modified according to the system without user's knowledge. What pattern should be used?

  1. Modifer Pattern
  2. Facade pattern
  3. Specialization pattern
  4. Intercepting Filter
  5. None of the above
Question 14 Multiple Choice (Single Answer)

The behaviour which affects the pattern designed is called as?

  1. Modifiers
  2. Forces
  3. Change Behaviour Stub
  4. Stubs
  5. None of the above
Question 15 Multiple Choice (Single Answer)

A class that operates on different objects. Which one would be a better pattern to use?

  1. Invoker pattern
  2. Double Dispatch pattern
  3. Factory pattern
  4. Intercepting Filter
  5. None of the above
Question 16 Multiple Choice (Single Answer)

You are designing the Robot, which will have different Behaviors built in it. 1. Aggressive 2. Normal 3. Command What kind of design pattern you will use?

  1. Double Dispatch pattern
  2. OO Design pattern
  3. Robot Design pattern
  4. Strategy Pattern
  5. None of the above
Question 17 Multiple Choice (Single Answer)

Making same named methods work differently for different type objects.

  1. Generalization pattern
  2. Encapsulation
  3. Inheritance
  4. Polymorphism
  5. None of the above
Question 18 Multiple Choice (Single Answer)

An enterprise need to create an Web application in such a way that each parts can be easily modified individually.

  1. USE J2EE Architecture
  2. Model-View-Controller
  3. USE PHP and Javascript
  4. ASP.NET Web application
Question 19 Multiple Choice (Single Answer)

Attach additional responsibilities to an object dynamically.It provides a flexible alternative to subclassing for extending functionality.

  1. Chain of responsibility
  2. Adapter
  3. Decorator
  4. Composite
Question 20 Multiple Choice (Single Answer)

Which one of the following is not a participant in Builder pattern?

  1. Builder
  2. ConcreteBuilder
  3. Producer
  4. Product