MCQOPTIONS
Saved Bookmarks
This section includes 458 Mcqs, each offering curated multiple-choice questions to sharpen your Computer Science Engineering (CSE) knowledge and support exam preparation. Choose a topic below to get started.
| 401. |
Which of the following is correct about Factory design pattern. |
| A. | this type of design pattern comes under creational pattern. |
| B. | factory pattern creates object without exposing the creation logic to the client. |
| C. | factory pattern refers to newly created object using a common interface. |
| D. | all of the above |
| Answer» E. | |
| 402. |
Which design pattern defines one-to-many dependency among objects? |
| A. | singleton pattern |
| B. | facade pattern |
| C. | observer pattern |
| D. | factory method pattern |
| Answer» D. factory method pattern | |
| 403. |
The indirection pattern supports _____________ |
| A. | low coupling |
| B. | reuse |
| C. | both a&b |
| D. | none of above |
| Answer» D. none of above | |
| 404. |
A good software will have _____________. |
| A. | high cohesion |
| B. | low coupling |
| C. | both a&b |
| D. | none of above |
| Answer» D. none of above | |
| 405. |
We can make an object as Controller, if ___________________ |
| A. | object represents the overall system |
| B. | object represent a use case, handling a sequence of operations |
| C. | both a&b |
| D. | none of above |
| Answer» D. none of above | |
| 406. |
In Low coupling two elements are coupled, if ______________________. |
| A. | one element has aggregation/composition association with another element. |
| B. | one element implements/extends other element. |
| C. | both a&b |
| D. | none of above |
| Answer» D. none of above | |
| 407. |
A _____________ system is one in which each of its components has little or no knowledge of the definitions of other separate components. |
| A. | tightly coupled |
| B. | strong coupled |
| C. | loosely coupled |
| D. | weak coupled |
| Answer» D. weak coupled | |
| 408. |
___________ is a measure of how strongly one element is connected to, has knowledge of, or relies on other elements. |
| A. | coupling |
| B. | creator |
| C. | controller |
| D. | bonding |
| Answer» B. creator | |
| 409. |
Which Design Pattern should you use when more than one object may handle a request, and the handler isn't known a priori. The handler should be ascertained automatically. |
| A. | observer |
| B. | chain of responsibility |
| C. | decorator |
| D. | prototype |
| Answer» C. decorator | |
| 410. |
Which Design Pattern should you use when an application uses a large number of objects and the storage costs are high because of the sheer quantity of objects. |
| A. | interpreter |
| B. | singleton |
| C. | facade |
| D. | composite |
| Answer» E. | |
| 411. |
Which GRASP pattern helps to find out answer for “Who should be responsible for creating a new instance of some class?" |
| A. | adapter |
| B. | protected variations |
| C. | creator |
| D. | controller |
| Answer» D. controller | |
| 412. |
Which Design Pattern should you use whenyou want to represent part-whole hierarchies of objects. |
| A. | composite |
| B. | iterator |
| C. | abstract factory |
| D. | flyweight |
| Answer» B. iterator | |
| 413. |
Which Design Pattern should you use when you want to parameterize objects by an action to perform. |
| A. | command |
| B. | prototype |
| C. | strategy |
| D. | builder |
| Answer» B. prototype | |
| 414. |
The main advantage of design patterns: |
| A. | provide proven solutions |
| B. | simplify complex problems |
| C. | improve communication |
| D. | all of above |
| Answer» E. | |
| 415. |
The Proxy pattern deals with situations where you have a complex object or it takes a long time to create the object. |
| A. | true |
| B. | flase |
| Answer» B. flase | |
| 416. |
It is also known as Wrapper, it is used when subclassing is not possible or practical to add functionality and it is used to add functionality at runtime. This pattern is |
| A. | compostite |
| B. | decorator |
| C. | adapter |
| D. | observer |
| Answer» C. adapter | |
| 417. |
A concrete class must have ........... |
| A. | no program code for any of its methods |
| B. | program code for all of its methods |
| C. | program code for some of its methods |
| D. | no program code for some of its methods |
| Answer» C. program code for some of its methods | |
| 418. |
Which GRASP pattern is suitbale to handle alternatives based on type? |
| A. | indirection |
| B. | pure fabrication |
| C. | polymorphism |
| D. | creator |
| Answer» D. creator | |
| 419. |
A pattern that is intended to provide a means to define a family of algorithms and encapsulate each one as an object for interchangeable use |
| A. | strategy pattern |
| B. | factory pattern |
| C. | observer pattern |
| D. | adapter pattern |
| Answer» B. factory pattern | |
| 420. |
Which of the following is an object pattern that encapsulates interchangeable algorithms in objects so the algorithm can vary independently of the classes that use it? |
| A. | chain of responsibility |
| B. | strategy |
| C. | mediator |
| D. | memento |
| Answer» C. mediator | |
| 421. |
Which of the following patterns allows multiple objects an opportunity to process a request without guaranteeing that any of them must process it? |
| A. | chain of responsibility |
| B. | command |
| C. | memento |
| D. | mediator |
| Answer» B. command | |
| 422. |
Which design pattern you would you use to limit the class instantiation to one object? |
| A. | factory method design pattern |
| B. | builder design pattern |
| C. | prototype design pattern |
| D. | singleton design pattern |
| Answer» E. | |
| 423. |
Which design pattern is used in the Java Database connectivity JDBC(TM)? |
| A. | builder design pattern |
| B. | factory method design pattern |
| C. | abstract factory design pattern |
| D. | singletone design pattern |
| Answer» C. abstract factory design pattern | |
| 424. |
Encapsulate a request as an object, there by letting you parametrize clients with different requests, queue or log requests, and support undoable operation. |
| A. | adapter |
| B. | command |
| C. | decorator |
| D. | composite |
| Answer» C. decorator | |
| 425. |
Define a family of algorithms, encapsulate each one, and make them interchangeable. It lets the algorithm vary independently from clients that use it. |
| A. | template method |
| B. | decorator |
| C. | strategy |
| D. | visitor |
| Answer» D. visitor | |
| 426. |
Which of the following is not one of the elements of a design pattern? |
| A. | context |
| B. | environment |
| C. | problem |
| D. | solution |
| Answer» E. | |
| 427. |
Which of the following represents The (static) structure and (dynamic) behavior of the pattern? |
| A. | name |
| B. | application |
| C. | consequences |
| D. | form |
| Answer» E. | |
| 428. |
In which of the following pattern, a null object replaces check of NULL object instance? |
| A. | state pattern |
| B. | null object pattern |
| C. | strategy pattern |
| D. | template pattern |
| Answer» C. strategy pattern | |
| 429. |
The __________ allows an object to alter its behavior when its internal state changes. |
| A. | abstract factory |
| B. | state pattern |
| C. | flyweight pattern |
| D. | adapter pattern |
| Answer» C. flyweight pattern | |
| 430. |
Use ___________ when you need to define a family of algorithms, encapsulate each one, and make them interchangeable. |
| A. | state pattern |
| B. | abstract factory |
| C. | strategy pattern |
| D. | singleton pattern |
| Answer» D. singleton pattern | |
| 431. |
Scope based classification decided if the pattern applies to mainly classes or objects. |
| A. | true |
| B. | false |
| Answer» B. false | |
| 432. |
The _____________ helps you to create tree structures of objects. |
| A. | builder pattern |
| B. | composite pattern |
| C. | flyweight pattern |
| D. | mediator pattern |
| Answer» C. flyweight pattern | |
| 433. |
________________ makes a clear-cut between abstraction and implementation. |
| A. | facade pattern |
| B. | builder pattern |
| C. | prototype pattern |
| D. | bridge pattern |
| Answer» E. | |
| 434. |
The ___________ is used to translate the interface of one class into another interface. |
| A. | facade pattern |
| B. | builder pattern |
| C. | prototype pattern |
| D. | adapter pattern |
| Answer» E. | |
| 435. |
The ___________used to ease the construction of a complex object from simple objects. |
| A. | builder pattern |
| B. | construct pattern |
| C. | create pattern |
| D. | none of above |
| Answer» B. construct pattern | |
| 436. |
Most user interface design patterns fall with in one of ____ categories of patterns. |
| A. | 5 |
| B. | 10 |
| C. | 25 |
| D. | 100 |
| Answer» C. 25 | |
| 437. |
A pattern language ______________ |
| A. | encompasses a collection of patterns |
| B. | is implemented using hypertext |
| C. | resembles the structure of natural languages |
| D. | none of above |
| Answer» B. is implemented using hypertext | |
| 438. |
In which of the following pattern, a visitor class is used which changes the executing algorithm of an element class? |
| A. | visitor pattern |
| B. | mvc pattern |
| C. | business delegate pattern |
| D. | composite entity pattern |
| Answer» B. mvc pattern | |
| 439. |
Which one pattern creating duplicate object? |
| A. | filter pattern |
| B. | prototype pattern |
| C. | bridge pattern |
| D. | builder pattern |
| Answer» C. bridge pattern | |
| 440. |
Which of the following are levels of design focus that can be used to categorize WebApp patterns? |
| A. | behavioral patterns |
| B. | functional patterns |
| C. | navigation patterns |
| D. | both a &c |
| Answer» E. | |
| 441. |
Facade pattern promotes weak coupling between subsystem and its clients. |
| A. | true |
| B. | false |
| Answer» B. false | |
| 442. |
Which design pattern works on data and action taken based on data provided? |
| A. | command pattern |
| B. | singleton pattern |
| C. | mvc pattern |
| D. | facade pattern |
| Answer» B. singleton pattern | |
| 443. |
Which design pattern suggests multiple classes through which request is passed and multiple but only relevant classes carry out operations on the request? |
| A. | singleton pattern |
| B. | chain of responsibility pattern |
| C. | state pattern |
| D. | bridge pattern |
| Answer» D. bridge pattern | |
| 444. |
Which design pattern ensures that only one object of particular class gets created? |
| A. | singleton pattern |
| B. | filter pattern |
| C. | state pattern |
| D. | bridge pattern |
| Answer» B. filter pattern | |
| 445. |
Which design pattern provides a single class which provides simplified methods required by client and delegates call to those methods? |
| A. | adapter pattern |
| B. | builder pattern |
| C. | facade pattern |
| D. | prototype pattern |
| Answer» D. prototype pattern | |
| 446. |
Type of design patterns that provide solution for the better interaction between objects is ______________ |
| A. | creational |
| B. | structural |
| C. | behavioral |
| D. | none of above |
| Answer» D. none of above | |
| 447. |
A ___________ is a class that does not represent a concept in the problem domain. |
| A. | indirection |
| B. | information expert |
| C. | pure fabrication |
| D. | protected variations |
| Answer» D. protected variations | |
| 448. |
Benefit of Pure Fabrication is _______________ |
| A. | high cohesion |
| B. | low coupling |
| C. | class reuse |
| D. | all of above |
| Answer» E. | |
| 449. |
Benefit of ______________ is handling new variations will become easy. |
| A. | cohesion |
| B. | coupling |
| C. | polymorphism |
| D. | inheritance |
| Answer» D. inheritance | |
| 450. |
Controller class is called _____________, if the class is overloaded with too many responsibilities. |
| A. | overload |
| B. | bloated |
| C. | full |
| D. | overflow |
| Answer» C. full | |