Javascript Design Patterns/Javascript Design Patterns Mcq Question Set 1 Sample Test,Sample questions

Question:
 A class (the adapter class) may be given a new interface by an adapter class in which of these ways?

1.Class Adapter pattern

2.Object Adapter pattern

3.All of the mentioned

4.None of the mentioned


Question:
 How does a use of template allowed in components simplify things?

1.Reliability is enhanced

2.Coding time is increased

3.Testing is more complexed

4. All of the mentioned


Question:
 What are the procedure followed for description of candidate architecture?

1.Description should be done in architectural notation that is well understood by the parties involved in the analysis

2.Description can be done in any notations that are well understood by the parties involved

3.Description may or may not be described in notations that are used for analysis

4.None of the mentioned


Question:
 Which class that can have only one instance?

1. Adaptor Class

2.Proxy Class

3.Singleton Class

4.Factory class


Question:
 Why is scenario interaction important?

1.It exposes the allocation of functionality to the product’s design

2.It follows a communication path which leads to systems stability

3.It achieves main goal of modifiability

4.None of the mentioned


Question:
A class (the adapter class) may be given a new interface by an adapter class in which of the two ways?

1.The adapter may subclass the adapter. The adapter can inherit adapter operations with appropriate semantics and pragmatics, override those with inappropriate semantics or pragmatics, and add operations needed for the new interface. This is the Class Adapt

2.The adapter may hold a reference to the adapter and delegate must work to the adapter object. This approach is the Object Adapter pattern

3.All of the mentioned

4.None of the mentioned


Question:
How is Flexibility enhanced when a template is allowed in the component?

1.Conforming components are largely interchangeable

2.Conforming components are not largely interchangeable

3. All of the mentioned

4.None of the mentioned


Question:
How is reliability enhanced when a template is allowed in component?

1.Once the template is incorrect, then templatized portion of every using component is correct

2.Once the template is correct, then templatized portion of every using component is correct

3.All of the mentioned

4.None of the mentioned


Question:
How is Testing simplified when a template is allowed in component?

1. Each component has a standard structure

2.Each component has a complex structure

3.All of the mentioned

4.None of the mentioned


Question:
Most object-oriented languages and systems provide which of these ways to create new objects?

1. Instantiating a class using one of its constructors

2.Cloning an existing object

3.All of the mentioned

4.None of the mentioned


Question:
Patterns are mostly used in which of the following?

1.Design in large

2.Design in Small

3. Coding

4. All of the mentioned


Question:
The Adapter patterns provide object-oriented adapters in which of theses varieties?

1.One uses inheritance

2.one uses delegation

3.All of the mentioned

4.None of the mentioned


Question:
The Factory patterns decouple clients from products by taking advantage of interfaces in two ways?

1.The generator class with the factory methods cannot be changed, disallowing variability in factory method implementations

2. Instances of a variety of classes that implement the product interface can be returned by a factory method, allowing great flexibility in results

3.All of the mentioned

4.None of the mentioned


Question:
What are stand-ins for objects not yet created are called?

1.virtual proxies

2.remote proxies

3.access proxies

4.None of the mentioned


Question:
What are the classifications of Scenarios?

1.Direct Scenario

2. Indirect Scenario

3. Forward Scenario

4.Direct & Indirect Scenario


Question:
What are the drawbacks for singleton class?

1.Many languages do not allow classes to be values assignable to variables.

2.Singleton classes can be subclassed, and the singleton factory method can return a sub-class instance

3. Classes can easily replace only single instances

4.All of the internship


Question:
What are the types of factory pattern?

1.Factory Method

2.Abstract Method

3.All of the mentioned

4.None of the mentioned


Question:
What benefits does patterns provide?

1.Novice designers can benefit from learning solution patterns that experts use, without needing design experience

2.Expert designers can benefit from studying patterns too: They can broaden their repertoire of patterns and deepen their understanding of the patterns they already know

3.All of the mentioned

4.None of the mentioned


Question:
What does emphasizing solution actually mean for patterns to operate?

1.Discovering patterns rather than inventing them

2.Serves as exemplars to programmers

3.All of the mentioned

4.None of the mentioned


Question:
What is a pattern?

1. It is a model proposed for imitation

2.It solves a software design problem

3.All of the mentioned

4.None of the mentioned


Question:
What is done while performing scenario evaluation?

1.For indirect scenario, the changes to the architecture that are necessary for it to support the scenario must be listed

2.Cost of performing the change must be estimated

3.There should be summary table that lists all scenarios (direct and indirect)

4.All of the Mentioned


Question:
When a generator assumes responsibility for product object creation in a factory method,which of the following capabilities become available?

1.Access to product constructors can be restricted

2.Private data can be provided to new product objects

3.Product objects can be configured after creation

4.All of the Mentioned


Question:
When there is a need to implement strategy pattern?

1.When a single task is implemented in variety of ways

2.When it is dependent on nature of inputs

3.All of the mentioned

4.None of the mentioned


Question:
Which among the following are the arguments made by Alexander?

1.Good building design patterns are consequences of human anatomy,psychology, physiology, sociology, and politics and so are things in the world that can be discovered and verified

2.Great architecture has always relied on patterns, but they have never been studied systematically

3.Anyone can make great buildings once the patterns are known and understood

4.All of the Mentioned


Question:
Which among these are the design patterns?

1.Architectural Styles and Programming Idioms

2.Mid-Level Design Patterns

3.Data Structures and Algorithms

4.All of the Mentioned


Question:
Which are the several reasons for using generator patterns?

1.Product Creation Control

2.Product Configuration Control

3.Client and Product Decoupling

4.All of the Mentioned


Question:
Which design pattern focus on the design patterns movement?

1.Architectural Styles

2.Mid-Level Design Patterns

3.Data Structures and Algorithms

4.Programming Idioms


Question:
Which of the factors make a pattern portable?

1. Creating instances of some appropriate resource at run time

2.Presentation of two different user interface tool-kits

3.All of the mentioned

4. none of the mentioned


Question:
Which of the following are true for pattern?

1.It is a small collection of atomic units

2.They are ubiquitous throughout software development

3. All of the mentioned

4.None of the mentioned


Question:
Which of the following are true for the singleton class?

1.Singleton classes should be used whenever it is important that only a single instance of a class exist and that that single instance be widely accessible

2.The Singleton pattern can also be used, with slight modifications, when a limited number of instances greater than one are desired

3.Access restrictions are usually easy to add by restricting the visibility of either the class or the factory method

4.All of the Mentioned


Question:
Which of the following can a pattern operate on?

1.Emphasize the solutions

2.Identify and name abstract

3.Provide a target for recognition

4.All of the Mentioned


Question:
Which of the following Choices and standardizes patterns for a problem domain promotes software reuse and, hence, quality and productivity?

1.Promoting Communication

2.Streamlining Documentation

3.Increasing Development Efficiency

4.Supporting Software Reuse


Question:
Which of the following is consequence for proxy pattern?

1.The Proxy pattern makes it possible to defer expensive operations until they are necessary (virtual proxies)

2.Provides an elegant way to treat remote objects as if they were local (remote proxies)

3.Provides a mechanism for implementing supplier access restrictions (protection or access proxies)

4.All of the Mentioned


Question:
Which of the following is for factory method behavioral characteristic?

1.Interpreter

2.Template method

3. Iterator

4.None of the mentioned


Question:
Which of the following is incorrect with respect to the proxy pattern?

1.The Proxy pattern should be used whenever the services directly provided by some object need to be managed or mediated in some way without changing the object’s interface

2. Virtual proxies can be used to delay the creation or loading of large and time-consuming objects to preserve space and ensure rapid responses to requests

3.Remote proxies can hide the fact that an object is not locally present,handling the communication necessary to access the remote real object

4.None of the mentioned


Question:
Which of the following is not followed by proxy pattern?

1.virtual proxies

2. remote proxies

3.access proxies

4. none of the mentioned


Question:
Which of the following is strategy pattern dependent on?

1.Scalability

2.Modifiability

3.Portability

4.Modifiability & Portability


Question:
Which of the following is true about factory method?

1.A factory method is a non-constructor operation that creates and returns class instances

2.Factory methods are widely used in mid-level design patterns and in object-oriented programming in general

3.Factory methods create new instances using constructors or cloning, so they do not rely on any special technique for class instantiation

4.All of the Mentioned


Question:
Which of the following is true for Adapter pattern?

1.An adapter or wrapper is a component that provides a new interface for an existing component

2. An Adapter or Wrapper pattern is a broker pattern that provides a new interface for existing software so that it can be reused

3.Adaptation for reuse is an old technique that has been used since the beginning of software development

4.All of the mentioned


Question:
Which of the following is true for proxy pattern?

1.Has exactly the same interface as the real object

2.Handles routine or illegitimate messages without accessing the real object

3.Handles routine or illegitimate messages without accessing the real object

4.All of the Mentioned


Question:
Which of the following is true?

1. A direct scenario cannot be assessed indirect manner by the system

2. Another scenario except the direct scenario requires modification before it is executed

3.All of the mentioned

4.None of the mentioned


Question:
Which of the following is true?

1. Every direct scenario will require changing only a single component

2.Every indirect scenario will not require changing only a single component

3.Every indirect scenario will require changing only a single component

4.None of the mentioned


Question:
Which of the following is used in Decorator design pattern?

1.Broder Wrapper

2.Scroll Wrapper

3.Text View

4. All of the mentioned


Question:
Which of the following relates to Scenarios?

1.Scenarios illustrate the kinds of activities that the system must support

2.Scenarios illustrate the kinds of changes that it is anticipated will be made to the system

3.All of the mentioned

4.None of the mentioned


Question:
Which of the following represents The (static) structure and (dynamic) behavior of the pattern?

1.Name

2.Application

3.Consequences

4.Form


Question:
Which of the following steps are followed for the Overview of SAAM?

1.Develop Scenarios

2.Describe Candidate Architecture

3.Classify Scenarios

4.All of the Mentioned


Question:
Which of the following truly describes the structure of Generator pattern?

1.A generator pattern has a Client that needs an instance of a Product class

2.A Generator that creates or obtains access to such an instance on behalf of the Client

3.All of the mentioned

4. none of the mentioned


Question:
Which of these are the part of 253 patterns in pattern book by Alexander?

1.Four-Story Limit

2.South-Facing Outdoors

3.Warm Colors

4.All of the Mentioned


Question:
Which of these states about Object Adapter pattern?

1.The adapter can inherit adapter operations with appropriate semantics and pragmatics, override those with inappropriate semantics or pragmatics, and add operations needed for the new interface

2.The adapter may hold a reference to the adapter and delegate must work to the adapter object

3.All of the mentioned

4.None of the mentioned


Question:
Why are Patterns important?

1.They capture expert design knowledge

2.They make captured design accessible to both novices and other experts

3.All of the mentioned

4.None of the mentioned


More MCQS

  1. Javascript Design Patterns Mcq Question Set 1
  2. Javascript Design Patterns Mcq Question Set 2
Search
Olete Team
Online Exam TestTop Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on Online Exam Testwebsite is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!