The observed pattern is?
Structural
Creational
Behavioral
Executional
The Factory pattern is?
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?
Memento
Adapter
Builder
Strategy
Facade
Single responsibility of principle?
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
Which of the patterns refers to creating duplicate object while keeping performance in mind?
Composite pattern
Facade Pattern
Builder pattern
Prototype pattern
The open close principle?
Helps ensure that objects are highly reusable
Requires that methods that are present in base classes must also be present in the derived classes
Helps ensure that objecs are easy extend without requiring change to the original object
Which of the following is not a software engineering risk?
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
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?
Observer
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?
A design pattern _______
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
Name types of design patterns?
Creational, Structural, Behavioral
Creational, Executional, Structural
Creational, Behavioral, Executional
Behavioral, Executional, Structural
Why are Patterns important?
they capture expert design knowledge
All
None
make it accessible to both novices and other experts
Liskov’s substitution principle?
Helps ensure that object are easy to extend without requiring change to the original object
helps ensure that objects are hihtly reusable
Upper case tools to support later activities such as programming, debugging and testing?
True
False
The Dependency inversion principle?
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 mosty implementers
Can we create a clone of a singleton object?
Yes
No
which pattern does this object model represent
Singleton Pattern
Builder Pattern
Prototype Pattern
Which pattern does this object model represent?
State pattern
Facade pattern
Strategy Pattern
Observer Pattern
State Pattern
Composite Pattern
Strategy pattern
Singleton pattern
Define one to many dependency between objects so that when one changes state, all its dependents are notified and updated automatically
Observer pattern
The Interface Segregation Principle ?
Hhelps make changing an object easier
Helps ensure that objects are hihtly reusable
The Pattern is used where we need to treat a group of objects in similar way as a single object
Composite