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.
Questions
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
- Database Server
- Application Server
- Firewall
- Internet Router
An enterprise need to create an Web application in such a way that each parts can be easily modified individually.
- USE J2EE Architecture
- Model-View-Controller
- USE PHP and Javascript
- ASP.NET Web application
A Visitor Design pattern is
- Intercepting Filter
- Factory pattern
- Invoker pattern
- Double Dispatch pattern
- None of the above
Need to create a class, which will return the same instance whenever requested
- Singleton pattern
- One Instance pattern
- No such class be formed
- Static classes are one instance classess
- None of the above
Notify changes happened in one class to all it's dependent class
- Observer pattern
- DataAccess pattern
- Publisher Pattern
- Subscriber Pattern
- None of the above
You want to encapsulate data access and manipulation in a separate layer.
- Encapsulation
- Polymorphism
- Inheritance
- Data Access object
- None of the above
What pattern does this code have implemented
- No pattern could be identified
- Polymorphism
- Facade pattern
- Visitor pattern
- Observer pattern
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?
- Observer Pattern
- Intercepting Filter
- Iterator pattern
- Value List Iterator pattern
- Facade pattern
Implementation details of creating different object should not be exposed out. What kind of class will help to achive this?
- Facade pattern
- Specialization pattern
- Value List Iterator pattern
- Factory pattern
- None of the above
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
- Inheritance pattern
- Generalization pattern
- Specialization pattern
- Implementation pattern
- None of the above
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?
- Looper pattern
- Visitor pattern
- DataAccess pattern
- Iterator pattern
- None of the above
You need to add few data to the request object once the request is submited to the server.
- Insertion pattern
- Modifer Pattern
- No Such operation can be done once the web request is submited
- Intercepting Filter
- None of the above
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?
- Modifer Pattern
- Facade pattern
- Specialization pattern
- Intercepting Filter
- None of the above
The behaviour which affects the pattern designed is called as?
- Modifiers
- Forces
- Change Behaviour Stub
- Stubs
- None of the above
A class that operates on different objects. Which one would be a better pattern to use?
- Invoker pattern
- Double Dispatch pattern
- Factory pattern
- Intercepting Filter
- None of the above
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?
- Double Dispatch pattern
- OO Design pattern
- Robot Design pattern
- Strategy Pattern
- None of the above
Making same named methods work differently for different type objects.
- Generalization pattern
- Encapsulation
- Inheritance
- Polymorphism
- None of the above
An enterprise need to create an Web application in such a way that each parts can be easily modified individually.
- USE J2EE Architecture
- Model-View-Controller
- USE PHP and Javascript
- ASP.NET Web application
Attach additional responsibilities to an object dynamically.It provides a flexible alternative to subclassing for extending functionality.
- Chain of responsibility
- Adapter
- Decorator
- Composite
Which one of the following is not a participant in Builder pattern?
- Builder
- ConcreteBuilder
- Producer
- Product