0

architecture Online Quiz - 13

Description: architecture Online Quiz - 13
Number of Questions: 20
Created by:
Tags: architecture
Attempted 0/20 Correct 0 Score 0

Which of the following are types of Creational Patterns?

  1. Adapter, Bridge and Decorator.

  2. Singleton, Builder and Factory Method.

  3. Facade, Flyweight and Proxy.

  4. Iterator, Observer and Template.


Correct Option: B

Example of Decorator pattern in Java API?

  1. java.util.List

  2. java.lang.String

  3. java.io.BufferedInputStream.

  4. None of the above.


Correct Option: C

AI Explanation

To answer this question, let's go through each option to understand if it represents an example of the Decorator pattern in the Java API:

Option A) java.util.List - This option is incorrect. The List interface in Java represents an ordered collection of elements and does not implement the Decorator pattern.

Option B) java.lang.String - This option is incorrect. The String class in Java represents a sequence of characters and does not implement the Decorator pattern.

Option C) java.io.BufferedInputStream - This option is correct. The BufferedInputStream class in the java.io package is an example of the Decorator pattern in the Java API. It provides additional functionality to an input stream by buffering the input and improving performance.

Option D) None of the above - This option is incorrect. Option C, java.io.BufferedInputStream, is an example of the Decorator pattern in the Java API.

The correct answer is: C) java.io.BufferedInputStream. This option represents an example of the Decorator pattern in the Java API because it adds functionality to an existing input stream by buffering the input.

The -------------- Method pattern should be used to implement the invariant parts of an algorithm once and leaves it up to subclasses to implement the behavior that can vary

  1. Strategy Pattern.

  2. Template Pattern.

  3. Observer Pattern.

  4. None of the above.


Correct Option: B

The Java API uses this pattern in the event model of its AWT/Swing Classes

  1. Strategy Pattern.

  2. Template Pattern.

  3. Observer pattern.

  4. None of the above.


Correct Option: C

Which pattern prescribes recursive composition for complex objects?

  1. Composite Pattern

  2. Strategy Pattern

  3. Observer Pattern

  4. Factory Pattern


Correct Option: A

Which pattern is used to allow different implementations of an algorithm or operation to be selected dynamically at runtime?

  1. Façade Pattern.

  2. Adapter Pattern

  3. Strategy Pattern.

  4. Factory pattern.


Correct Option: C

Which Pattern is used when it must be decided at run time which one of the several compatible classes is to be instantiated?[

  1. Singleton Pattern

  2. Façade Pattern.

  3. Factory Pattern.

  4. Adapter Pattern.


Correct Option: C

What Modifier needs to be added in order to make the below function as Singleton Class? ----------- -------- Connection getConnection() throws Exception{ return new Connection(); }

  1. private, final.

  2. protected, static

  3. public, static

  4. public, final.


Correct Option: C

Suppose I have to code a program to draw 1000 circles with 6 different colors – Which Structural Pattern approach would help?

  1. Façade.

  2. FlyWeight.

  3. Decorator.

  4. Adpater


Correct Option: B

Which Behavioral Pattern would help in parsing and translate a Specific Expression?

  1. Command

  2. Interpreter

  3. Observer

  4. Iterator.


Correct Option: B

Which Behavioral Pattern move through a list of collection or aggregated objects without knowing its internal representations?

  1. Command

  2. Interpreter

  3. Mediator.

  4. Iterator.


Correct Option: D

What is the name of the design pattern in which the data, the data presentation and the data controls are defined separately?

  1. Model-View-Controller.

  2. Publish-Subscribe.

  3. Observer-Observable.

  4. Reader-Writer.


Correct Option: A

This Layer manages reading, writing, updating and deleting stored data?

  1. Value Objects Layer.

  2. Presentation Layer.

  3. Data access object layer.

  4. Deployment Layer.


Correct Option: C

I want to build a presentation layer in J2EE. Which option mentioned below would suit me?

  1. Web Services

  2. Struts

  3. JDBC

  4. EJB


Correct Option: B

-------------- is a BRMS that enables both business users and developers to manage the rules that drive their business.

  1. Hibernate

  2. Spring Framework

  3. ILOG Jrules.

  4. Savvion.


Correct Option: C

Business users work with ------------- to write and maintain business rules, both during application development and after the application is deployed to production

  1. RuleDocs.

  2. Rule Team Server.

  3. Rule Execution Server.

  4. Rule Studio.


Correct Option: B

Name the modules needed for development of Business Rule Applications?

  1. Architect, Developer and Business Analyst.

  2. Rule Studio, Rule Engine and Decision Validation Services.

  3. Design, Orchestrate and Author.

  4. None of the above.


Correct Option: B

Name the Role responsible for the development, testing, debugging and deployment of Business Rule Applications

  1. Architect.

  2. Developer.

  3. Business Analyst.

  4. None of the above.


Correct Option: B
- Hide questions