Designing Software  «Prev  Next»

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