GofPattern
SiteMap
Design Patterns Course
Behavioral Patterns
Creational Patterns
Structural Patterns
Designing Software
«Prev
Next»
Design Patterns
Defining Patterns
Design Challenges
Pattern Concept
Design Pattern Components
Big-O Notation
Design Pattern Benefits
Three Types Design Patterns
Design Pattern Scope
Traffic Signals Project
Patterns Conclusion
Singleton Patterns
Design Pattern Elements
Intent Motivation
Pattern Applicability
Singleton Pattern Structure
Singleton Pattern-Quiz
Participants Collaborations
Consequences Effects
Class Implementation
Real World Examples
Substitute Patterns
Extension Variation Pattern
Course Project
Perfect Singleton
Pattern Conclusion
Creational Patterns
Creational Design Pattern
Creational Pattern Uses
Common Creational Patterns
Factory Pattern
Factory Method-Exercise
Factory Method Structure
Factory Method Consequences
Structural Patterns
Structural Pattern Example
StructuralPatterns Help Programmers
Patterns Help Programmers
Common Structural Patterns
Flyweight Pattern Motivation
Flyweight Suitability
FlyweightPattern Structure
FlyweightConsequences
Class Vehicles Intersection
Structural Patterns Conclusion
Behavioral Patterns
Define Behavioral Patterns
BehavioralPatterns Help Programmers
Common Behavioral Patterns
Observer Pattern Motivation
ObserverStructure TimeObserver Interface
TimeClass AsObserved Object
Observer Pattern Tradeoffs
Problems Require Mediator
Mediator Pattern Applicability
Mediator Pattern Structure
Benefits Pitfalls MediatorPattern
MediatorClass Course Project
Behavioral DesignPatterns Conclusion
Designing Software
How to Choose Pattern
How To Apply Pattern
Lessons Learned
Combine Design Patterns
Design Pattern Limitations
Traffic flow System
Course Conclusion
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
Correct answers:
Your Score: 0
Submit
Quiz Explanation