sdp5 patterns

Description

SDP5 Quiz on sdp5 patterns, created by Csse 1502 on 21/11/2017.
Csse 1502
Quiz by Csse 1502, updated more than 1 year ago
Csse 1502
Created by Csse 1502 over 6 years ago
243
1

Resource summary

Question 1

Question
The observed pattern is?
Answer
  • Structural
  • Creational
  • Behavioral
  • Executional

Question 2

Question
The Factory pattern is?
Answer
  • Creational
  • Structural
  • Executional
  • Behavioral

Question 3

Question
In the pattern, we create objects which represent various strategies and a context object whose behavior varies as per its strategy object. The strategy object changes the executing algorithm of the context object?
Answer
  • Memento
  • Adapter
  • Builder
  • Strategy
  • Facade

Question 4

Question
Single responsibility of principle?
Answer
  • Requires that methods that are present in base classes must also be present in derived classes
  • Requires that object interfaces only include methods that will be needed by most implementers
  • Helps make changing an object easier
  • helps ensure that objects are highly reusable
  • Helps ensure that objects are easy to extend without requiring change to the original object

Question 5

Question
Which of the patterns refers to creating duplicate object while keeping performance in mind?
Answer
  • Composite pattern
  • Facade Pattern
  • Builder pattern
  • Prototype pattern

Question 6

Question
The open close principle?
Answer
  • Helps make changing an object easier
  • Helps ensure that objects are highly reusable
  • Requires that methods that are present in base classes must also be present in the derived classes
  • Requires that object interfaces only include methods that will be needed by most implementers
  • Helps ensure that objecs are easy extend without requiring change to the original object

Question 7

Question
Which of the following is not a software engineering risk?
Answer
  • The code for sort algorithm is overly complex
  • The server may not scale to 1000 users
  • We do not adequately understand our customer's needs
  • The system is working fine, but if we try to change anything it seems to always break something else

Question 8

Question
A real life example could be a case of card reader which acts as the Pattern between memory card and a laptop. You plugin the memory card into card reader and card reader into the laptop so that memory card can be read via laptop?
Answer
  • Builder
  • Facade
  • Memento
  • Adapter
  • Observer

Question 9

Question
The pattern works as a bridge between two incompatible interfaces. This pattern involves a single class which is responsible to join functionalities of independent or incompatible interfaces?
Answer
  • Adapter
  • Facade
  • Builder
  • Observer
  • Memento

Question 10

Question
A design pattern _______
Answer
  • all
  • useful in - how a software problem was solved by a developer
  • gives examples of code that used the pattern
  • a general reusable solution to a commonly occurring problem

Question 11

Question
Name types of design patterns?
Answer
  • Creational, Structural, Behavioral
  • Creational, Executional, Structural
  • Creational, Behavioral, Executional
  • Behavioral, Executional, Structural

Question 12

Question
Why are Patterns important?
Answer
  • they capture expert design knowledge
  • All
  • None
  • make it accessible to both novices and other experts

Question 13

Question
Liskov’s substitution principle?
Answer
  • Helps ensure that object are easy to extend without requiring change to the original object
  • helps ensure that objects are hihtly reusable
  • Helps make changing an object easier
  • Requires that object interfaces only include methods that will be needed by most implementers
  • Requires that methods that are present in base classes must also be present in the derived classes

Question 14

Question
Upper case tools to support later activities such as programming, debugging and testing?
Answer
  • True
  • False

Question 15

Question
The Dependency inversion principle?
Answer
  • Requires that methods are present in base classes must also be in the derived classes
  • Helps ensure that objects are highly reusable
  • Helps make changing an object easier
  • Helps ensure that objects are easy to extend without requiring change to the original object
  • Requires that object interfaces only include methods that will be needed by mosty implementers

Question 16

Question
Can we create a clone of a singleton object?
Answer
  • Yes
  • No

Question 17

Question
which pattern does this object model represent
Answer
  • Singleton Pattern
  • Builder Pattern
  • Facade Pattern
  • Prototype Pattern

Question 18

Question
Which pattern does this object model represent?
Answer
  • State pattern
  • Facade pattern
  • Composite pattern
  • Builder pattern

Question 19

Question
Which pattern does this object model represent?
Answer
  • Strategy Pattern
  • Observer Pattern
  • State Pattern
  • Composite Pattern

Question 20

Question
Which pattern does this object model represent?
Answer
  • Facade pattern
  • Strategy pattern
  • Composite pattern
  • Builder pattern

Question 21

Question
Which pattern does this object model represent?
Answer
  • Facade pattern
  • Singleton pattern
  • State pattern
  • Strategy pattern
  • Composite pattern

Question 22

Question
Define one to many dependency between objects so that when one changes state, all its dependents are notified and updated automatically
Answer
  • Composite pattern
  • Observer pattern
  • Strategy pattern
  • State pattern

Question 23

Question
The Interface Segregation Principle ?
Answer
  • Hhelps make changing an object easier
  • Helps ensure that object are easy to extend without requiring change to the original object
  • Helps ensure that objects are hihtly reusable
  • Requires that methods are present in base classes must also be in the derived classes
  • Requires that object interfaces only include methods that will be needed by most implementers

Question 24

Question
The Pattern is used where we need to treat a group of objects in similar way as a single object
Answer
  • Composite
  • Observer
  • Facade
  • Memento
  • Builder
Show full summary Hide full summary

Similar

Biology (B3)
Sian Griffiths
What are assessments and what do they measure?
mtyler12008
Body Systems Revision
D Arora