SiteMap
Course
Behavior
Creation
Structure
Designing Software
«Prev
Next»
Design Patterns
Defining Patterns
Three Types Design Patterns
Behavioral Creational Structural
Design Pattern Components
Design Pattern Benefits
Design Pattern Scope
Three Categories Patterns
Singleton Patterns
Singleton Pattern-Quiz
Real World Examples
Design Pattern Elements
Creational Patterns
Factory Method Consequences
Factory Method-Exercise
Common Creational Patterns
Structural Patterns
Structural Pattern Example
Patterns Help Programmers
Common Structural Patterns
Flyweight Pattern
Flyweight Consequences
GOF Structural Patterns
Adapter Bridge Composite
Flyweight Suitability
Behavioral Patterns
Pros/Cons Mediator Pattern
Define Behavioral Patterns
Mediator Pattern Applicability
Behavioral Patterns Help Programmers
Observer Pattern Tradeoffs
Designing Software
How to Choose Pattern
Combine Design Patterns
Design Pattern Limitations
How To Apply Pattern
Designing Software with Design Patterns - Quiz
Each question is worth one point. Select the best answer or answers for each question.
1.
Which of the following is a basic principle of programming with design patterns?
Please select the best answer.
A.
Profile an application before deciding which methods to optimize
B.
Ensure that no more than one instance of a class exists at the same time
C.
Program to an interface, not an implementation
D.
Make attributes private, and provide access to them through public methods
2.
Which of the following is a basic principle of programming with design patterns?
Please select the best answer.
A.
Use data encapsulation to enforce constraints on object data
B.
Programmer time is often more critical than execution time
C.
When possible, use object composition instead of inheritance
D.
Operator overloading tends to be confusing except for essentially numeric objects
3.
Design patterns can be used in a single class or programs when:
Please select the best answer.
A.
Classes and objects need to maintain patterns
B.
Classes and objects need to form patterns
C.
When classes and objects have roles as participants in a pattern
D.
Classes and objects have more than one role
Score =
Correct answers:
Quiz Explanation