250+ MCQs on The Facade and Mediator Patterns and Answers

Software Design Multiple Choice Questions on “The Facade and Mediator Patterns”.

1. Which of the following is true for facade pattern?
a) The Façade pattern is a broker pattern that eases interaction between a client and a sub-system of suppliers
by providing a simpler interface to the sub-system
b) Sub-systems may contain many classes with complex interfaces and relationships, but often clients only need basic services that can be supplied through a simple interface
c) The broker class, called a façade, provides basic, simplified services to clients by taking upon itself the job of dealing with a complex sub-system
d) All of the mentioned

Answer: d
Clarification: All of the mentioned is true for facade pattern.

2. Which of the following belongs to iterator pattern?
a) They delegate activities to other portions of the sub-system to which they provide an interface
b) The details of such delegations depend on the sub-system in question
c) The behavior follows the general outline of a broker pattern interaction
d) None of the mentioned

Answer: d
Clarification: All of the statements belongs to facade pattern.

3. Which of the following i correct?
a) The Mediator pattern provides a means of increasing coupling
b) In the Mediator pattern, interacts with one another, collaborating objects and with a special mediator class
c) The objects are coupled only to the mediator, which contains all the code for coordinating the collaboration
d) All of the mentioned

Answer: c
Clarification: Rest other are false-The Mediator pattern provides a means of reducing coupling, In the Mediator pattern, classes interacts only with a special mediator class.

4. Which of the pattern all the classes coupling is reduced?
a) Iterator
b) Facade
c) Mediator
d) Proxy

Answer: c
Clarification: Coupling is reduced as interaction is only to special mediator class.

5. Which of the following is for Facade Pattern?
a) Interaction is begun by one of the collaborators or a client object outside the collaboration
b) The object directs the collaboration, with all communication going between it and the colleagues in the interaction
c) All of the mentioned
d) None of the mentioned

Answer: d
Clarification: All of the mentioned are for mediator pattern.

6. Which of the following is a type of broker pattern?
a) Mediator
b) Facade
c) None of the mentioned
d) All of the mentioned

Answer: d
Clarification: All of the mentioned are types of broker pattern.

7. Which of the following does not follow the sequence of the mediator pattern?
a) As in any broker pattern, the Mediator receives a request for service at last
b) It then controls an interaction with the collaborating colleagues to supply the service
c) If one collaborator needs help from another, it notifies the Mediator object, which obtains the needed service from another collaborator
d) None of the mentioned

Answer: a
Clarification: As in any broker pattern, the Mediator receives a request for service at first.

8. The Mediator pattern has which of the following advantages?
a) It decouples collaborators, making them more changeable and reusable
b) It centralizes control of an interaction in the mediator class, making it easier to change, thus increasing modifiability
c) It simplifies the collaborators, making them easier to understand, and hence to change
d) All of the mentioned

Answer: d
Clarification: All the mentioned are advantages for mediator pattern.

9. Which are the drawback for mediator pattern?
a) It may also increase collaborator cohesion
b) Forcing collaborator interaction through the mediator may compromise performance
c) All of the mentioned
d) None of the mentioned

Answer: b
Clarification: Increase in collaborator cohesion is advantage.

10. Which of the following is consequence of mediator class?
a) They makes a sub-system easier for clients to use
b) Lowers the coupling between the client and the sub-system
c) Increase re-usability by adapting a sub-system’s interface to client needs
d) It encapsulates an interaction, making the interaction easier to change

Answer: d
Clarification: Rest others are consequence of facade class.

250+ MCQs on Applying Unit Operations To User-Interface Software and Answers

Software Architecture online quiz on “Applying Unit Operations To User-Interface Software”.

1. Which among the following are the functions that any system with a user interface must provide?
a) Presentation
b) Dialogue
c) All of the mentioned
d) None of the mentioned

Answer: a
Clarification: Presentation and Application are the functions that any system with a user interface must provide.

2. What is Presentation?
a) Interaction with user
b) Understanding purpose of the system
c) It is the function that every interactive system must support
d) None of the mentioned

Answer: a
Clarification: Presentation- Interaction with user.

3. Which of the following is the main task accomplished by the user?
a) Compose a document
b) Create a spreadsheet
c) Send mail
d) All of the mentioned

Answer: d
Clarification: All of the mentioned are the main task accomplished by the user.

4. What is Dialogue?
a) Interaction with user
b) Understanding purpose of the system
c) It is the function that every interactive system must support
d) None of the mentioned

Answer: c
Clarification: Dialogue-It is the function that every interactive system must support.

5. Which of the following is incorrect about the monolithic model?
a) Monolithic model is simply an implementation model
b) It provides a good efficiency because application and interface model are directly connected
c) All of the mentioned
d) None of the mentioned

Answer: d
Clarification: All of the mentioned are correct.

6. What is Application?
a) Interaction with user
b) Understanding purpose of the system
c) It is the function that every interactive system must support
d) None of the mentioned

Answer: b
Clarification: Application-Understanding purpose of the system.

7. HCI which concerns lead the evolution of Seeheim Model?
a) Modifiability and Scalability
b) Modifiability and Portability
c) Modifiability alone
d) None of the mentioned

Answer: b
Clarification: HCI concern about Modifiability and Portability lead the evolution of Seeheim Model.

8. What are the portability concerns founded in Seeheim model?
a) Replacing the presentation toolkit
b) Replacing the application toolkit
c) Replacing the dialogue toolkit
d) Replacing the presentation & dialogue toolkit

Answer: d
Clarification: The portability concerns founded in Seeheim model are- Replacing the presentation toolkit and Replacing the application toolkit.

9. Which of the unit operations can increase the overall portability?
a) Resource sharing
b) Is-a Decomposition
c) Abstraction
d) All of the mentioned

Answer: c
Clarification: All of the mentioned unit operations can increase the overall portability.

10. Which of the following is true for Seeheim model?
a) Presentation is abstracted from dialogue and Application
b) Presentation and Dialogue is abstracted from Application
c) Presentation and Application is abstracted from Dialogue
d) None of the mentioned

Answer: a
Clarification: Presentation is abstracted from dialogue and application.

11. Which of the unit operation is used in Model view controller?
a) Is a Decomposition
b) Part Whole Decomposition
c) All of the mentioned
d) None of the operation

Answer: b
Clarification: Part whole decomposition is applied to MVC.

250+ MCQs on Building Domain Specific Languages and Answers

Software Architecture Assessment Questions and Answers on “Building Domain Specific Languages”.

1. Which of the following are the changes that most of the architecture follow?
a) Change in the internal working of one or more component
b) Change that affect an interface among the components
c) Change that affect the architecture
d) All of the mentioned

Answer: d
Clarification: All of the mentioned are the changes that most of the architecture follow.

2. Architecture embodies the commonalities across which of the following versions of system?
a) Prototyping
b) Product variation
c) Deployment
d) All of the mentioned

Answer: d
Clarification: Architecture embodies the commonalities across all of the mentioned versions.

3. Which of the following is possible to design a simple language?
a) Variations codified in a systematic fashion
b) Variations in a non systematic fashion
c) All of the mentioned
d) None of the mentioned

Answer: a
Clarification: To design a simple language Variations are codified in a systematic fashion.

4. Which of the following is true for the application generator?
a) Programs that take specification of other program as input
b) Programs that produce specifications input of program to output
c) All of the mentioned
d) None of the mentioned

Answer: c
Clarification: All of the mentioned are true for application generator.

5. Which of the following is application generator?
a) Compiler
b) Debugger
c) All of the mentioned
d) None of the mentioned

Answer: a
Clarification: Compiler is application generator.

6. Which of the following is parser generator?
a) YACC
b) YBAC
c) YAAC
d) YCAA

Answer: a
Clarification: YACC is the parser generator.

7. Which of the following is true for YACC?
a) It accepts specification for a parser as input
b) It produces parser as output
c) All of the mentioned
d) None of the mentioned

Answer: c
Clarification: All of the mentioned are true for YACC.

8. Which of the following is not a part of commonality?
a) Data structure used
b) Algorithm employed
c) Architecture of the parser
d) None of the mentioned

Answer: d
Clarification: All are the part of commonality.

9. Which of the following are the advantages for application generators?
a) Generating code faster
b) Cheap and more reliable code
c) All of the mentioned
d) None of the mentioned

Answer: c
Clarification: All of the mentioned are the advantages for application generators.

10. Which of the following are the steps for FAST?
a) Disagree on codification of variations
b) Build the application generator
c) All of the mentioned
d) None of the mentioned

Answer: b
Clarification: Steps of FAST-Agree on codification of variations and Build the application generator.