• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/19

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

19 Cards in this Set

  • Front
  • Back
Design Pattern
A description of a problem and its solution that you can apply to many similar programming situations
What is the Strategy Pattern
Defines a family of algorithms, encapsulates each one, and makes them interchangeable. AKA: Algorithim a box.
What class implements the strategy pattern.
The LayoutManager
What is the Observer Pattern?
A one-to-many dependency between objects so that when one object changes state, all of its dependents are notified and updated automatically.
What Uses the Observer Pattern.
JTrees
Model-View-Controller
Explain the three components of the Model-View-Controller
Model - data structure, no visual representation
View - visual representation
Controller - event handlers
What is the Factory Pattern?
A class that makes objects.
What's the use of the factory pattern?
Prevents misuse/improper construction
Hides Construction
Provides API Convenience
One stop shop for getting an object of a family type
The programmer never needs to know about the actual class/type
What Objects do factories make?
Common Ancestor
Same Apparent Type
Different Actual Type
What class uses the factory pattern?
BorderFactory use the Factory Pattern by creating Border Objects
What is the Singleton Pattern
Defines a type where only one object of that type may be constructed. By making the constructor private.
What makes a good singleton class.
Central app organizer class
Something everybody needs
Fully static classes
What is Command Abstraction?
We want to link all similar events to the same listener?
Information concerning the command can be abstracted to a separate command object
We did not use the command pattern for handlers. What did we do instead.
We made separate event handlers for each type interaction
What is the Fly Weight Pattern
Allows one object to be used to represent many identical instances.
A Flyweight must be ________.
Immutable
What is the Iterator Pattern
Iterates over a group of objects without revealing the detains of how the items are obtained.
What is the State Pattern?
Dynamically changes the representation of an object.
State Pattern is only used on ________.
Mutable Objects