Pregunta 1
Pregunta
Patterns [blank_start]recur[blank_end] in many applications
[blank_start]Encapsulate[blank_end] what varies
Favor over inheritance -> [blank_start]Composition[blank_end]
Dan was thrilled with this pattern -> [blank_start]Observer[blank_end]
Java IO , Networking, Sound -> [blank_start]APIS[blank_end]
Most patterns follow from OO .... [blank_start]Principles[blank_end]
Not your own [blank_start]Failures[blank_end].
High level libraries -> [blank_start]Frameworks[blank_end]
Pattern that fixed the simulator -> [blank_start]Strategy[blank_end]
Program to this, not an implementation -> [blank_start]Interface[blank_end]
Duck demo was located where ? [blank_start]Maui[blank_end]
Patterns go into your [blank_start]brain[blank_end]
Learn from the other guy's [blank_start]Successes[blank_end]?
Development constant [blank_start]change[blank_end]
Patterns give us a shared [blank_start]vocabulary[blank_end]
Respuesta
-
recur
-
Encapsulate
-
Composition
-
Observer
-
APIS
-
Principles
-
Failures
-
Frameworks
-
Strategy
-
Interface
-
Maui
-
brain
-
Successes
-
change
-
vocabulary
Pregunta 2
Pregunta
In factory method,each franchise is a __ [blank_start]CONCRETE CREATOR[blank_end]
We used __ in Simple Factory and Abstract Factory and ine-herintance in Factory [blank_start]OBJECT COMPOSITION[blank_end]
Abstract Factory creates a ___ of product [blank_start]FAMILY[blank_end]
In factory method, who decides which class to instantioate [blank_start]SUBCLASS[blank_end]
Not a real factory pattern but handy nonetheless [blank_start]SIMPLEFACTORY[blank_end]
Role of PizzaStore in Factory Method Pattern [blank_start]CREATOR[blank_end]
Alle new york style pizza’s use this kind of cheese [blank_start]REGGIANO[blank_end]
In abstract factory, each ingredient factoryis a ____ [blank_start]CONCRETE FACTORY[blank_end]
When you use new, you are programming to an __ [blank_start]IMPLEMENTATION[blank_end]
Ethan likes this kind of pizza NYSTYLE createPizza() is a __ [blank_start]FACTORYMETHOD[blank_end]
Joel likes this kind of pizza [blank_start]CHICAGOSTYLE[blank_end]
In factory Method, the PizzaStore and the concrete pizza class all depend on this abstraction [blank_start]PIZZA[blank_end]
When a classs instantiates an object from a concrete class, it’s ___ on that object [blank_start]DEPENDENT[blank_end]
All factory patterns allow us to __object creation [blank_start]ENCAPSUATE[blank_end]
Respuesta
-
CONCRETE CREATOR
-
OBJECT COMPOSITION
-
FAMILY
-
SUBCLASS
-
SIMPLEFACTORY
-
CREATOR
-
REGGIANO
-
CONCRETE FACTORY
-
IMPLEMENTATION
-
FACTORYMETHOD
-
CHICAGOSTYLE
-
PIZZA
-
DEPENDENT
-
ENCAPSUATE
Pregunta 3
Pregunta
It was one of a kind [blank_start]CLASSLOADERS[blank_end]
Multiple can cause problems (down) CAR Added to chocolate in the boiler [blank_start]MILK[blank_end]
A singleton is a class that manages an instance of __ [blank_start]ITSELF[blank_end]
If you don’t need to worry about lazy instantiation, you can create your instance__ [blank_start]STATICALLY[blank_end]
Prior to 1,2 this can eat your Singletons [blank_start]GARBAGECOLLECTOR[blank_end]
The singleton was embaressed it had no public__ [blank_start]CONSTRUCTOR[blank_end]
The classic implementation doesn’t handle this [blank_start]MULTITHREADING[blank_end]
An incorrect implementation caused this to overflow [blank_start]BOILER[blank_end]
Singleton ensures only one of these exist [blank_start]INSTANCE[blank_end]
Singleton provides a single instance and __ [blank_start]GLOBALACCESPOINT[blank_end]
The singleton pattern has one [blank_start]CLASS[blank_end]
Flawed multithreading approach if not using Java 1.5 [blank_start]DOUBLECHECKED[blank_end]
Chocolate capital os the [blank_start]US HERSHEY[blank_end]
One advantage over global variables: __ creation [blank_start]LAZY[blank_end]
Company that produces boilers [blank_start]CHOC O HOLIC[blank_end]
To totally defeat the new constructor, we have to declare the constructor___ [blank_start]PRIVATE[blank_end]
Respuesta
-
CLASSLOADERS
-
MILK
-
ITSELF
-
STATICALLY
-
GARBAGECOLLECTOR
-
CONSTRUCTOR
-
MULTITHREADING
-
BOILER
-
GLOBALACCESPOINT
-
INSTANCE
-
CLASS
-
DOUBLECHECKED
-
LAZY
-
US HERSHEY
-
PRIVATE
-
CHOC O HOLIC
Pregunta 4
Pregunta
Role of costumer in the command pattern [blank_start]CLIENT[blank_end]
Our first command object controlled this [blank_start]LIGHT[blank_end]
The waitress was one [blank_start]INVOKER[blank_end]
A command __ a set of actions and a receiver [blank_start]BINDS[blank_end]
Invoker and receiver are ___ [blank_start]DECOUPLED[blank_end]
Company that got us word of mouth business [blank_start]WEATHER O RAMA[blank_end]
Dr. Seuss diner food [blank_start]GREENEGGSANDHAM[blank_end]
Our favorite city [blank_start]OBJECT VILLE[blank_end]
Act as the receivers the remote control [blank_start]VENDORCLASSES[blank_end]
All command provide this [blank_start]EXECUTE[blank_end]
The cook and this person were definitely decoupled [blank_start]WAITRESS[blank_end]
Carries out a request [blank_start]RECEIVER[blank_end]
Object that knows the actions and the receiver [blank_start]COMMAND[blank_end]
Another thing command can do [blank_start]UNDO[blank_end]
Object that knows how to get things done [blank_start]RECEIVER[blank_end]
Waitress didn’t do this [blank_start]COOK[blank_end]
A command encapsulates this [blank_start]AREQUEST[blank_end]
Respuesta
-
CLIENT
-
LIGHT
-
INVOKER
-
BINDS
-
DECOUPLED
-
WEATHER O RAMA
-
GREENEGGSANDHAM
-
OBJECT VILLE
-
VENDORCLASSES
-
EXECUTE
-
WAITRESS
-
RECEIVER
-
COMMAND
-
UNDO
-
RECEIVER
-
COOK
-
AREQUEST
Pregunta 5
Pregunta
True of false, adapters can only wrap one object [blank_start]FALSE[blank_end]
Decorator called adapter this [blank_start]SIMPLE PASS THOUGH[blank_end]
One advantage of facade [blank_start]DECOUPLING[blank_end]
Priciple that wasn’t as easy as it sounded [blank_start]LEASTKNOWLEDGE[blank_end]
An adapter __ an interface [blank_start]CONVERTS[blank_end]
Movie we watched [blank_start]RAIDERSOFTHELOASTARC[blank_end]
A __ adds new behavior [blank_start]DECORATOR[blank_end]
Masquerading as a duck [blank_start]TURKEY[blank_end]
Example that violatest he principle of least knowledge: System.out ___ [blank_start]PRINTLN[blank_end]
If in europe you might need one of these [blank_start]ACADAPTER[blank_end]
Adapter with two roles [blank_start]TWOWAY[blank_end]
No movie is complete without this [blank_start]POPCORN[blank_end]
adapter client uses the __ interface [blank_start]TARGET[blank_end]
Facade still __low level acces [blank_start]ALLOWS[blank_end]
Duck do it better than turkeys [blank_start]FLY[blank_end]
Disadvantage of the principle of least knowledge: too many __ [blank_start]WRAPPERS[blank_end]
A __ simplifies an interface [blank_start]FACADE[blank_end]
An adapter and a decorator can be said to __ an object [blank_start]WRAP[blank_end]
New american dream [blank_start]HOMETHEATER[blank_end]
Respuesta
-
FALSE
-
SIMPLE PASS THOUGH
-
DECOUPLING
-
LEASTKNOWLEDGE
-
CONVERTS
-
RAIDERSOFTHELOASTARC
-
DECORATOR
-
TURKEY
-
PRINTLN
-
ACADAPTER
-
TWOWAY
-
POPCORN
-
TARGET
-
ALLOWS
-
FLY
-
WRAPPERS
-
FACADE
-
WRAP
-
HOMETHEATER
Pregunta 6
Pregunta
1Strategy uses …. Rather than inheritance [blank_start]Composition[blank_end]
4Type of sort used in Arrays [blank_start]Mergesort[blank_end]
5The JFrame hook method that we overrode to print “I Rule” [blank_start]Paint[blank_end]
6The Template method pattern uses …. To defer implementation to other classes. [blank_start]Inheritance[blank_end]
8Coffee and … [blank_start]Tea[blank_end]
9Don’t call us, we’ll call you is known as the …. Principle [blank_start]Hollywoord[blank_end]
12A template method defines the steps of an …. [blank_start]Algorithm[blank_end]
13In this chapter we gave you more …. [blank_start]Caffeine[blank_end]
14The template method is usually defined in an … class [blank_start]Abstract[blank_end]
16Class that likes web pages … [blank_start]Applet[blank_end]
2…. Algorithm stept are implemented by hook methods [blank_start]optional[blank_end]
3Factory method is a … of Template method. [blank_start]specialization[blank_end]
7The steps in the algorithm that must be supplied by the subclasses are usually declared
… [blank_start]Abstract[blank_end]
8Huey, Louie and Dewey all weigh… pounds [blank_start]Two[blank_end]
9A method in the abstract superclass that does nothing or provies deafult behavior is called a … method [blank_start]Hook[blank_end]
10Big headed pattern [blank_start]Strategy[blank_end]
11Our favorite coffee shop in object ville [blank_start]Starbuzz[blank_end]
15The Arrays class omplements its template method as a …. [blank_start]method[blank_end]
Respuesta
-
Composition
-
Mergesort
-
Paint
-
Inheritance
-
Tea
-
Hollywoord
-
Algorithm
-
Caffeine
-
Abstract
-
Applet
-
optional
-
specialization
-
Abstract
-
Two
-
Hook
-
Strategy
-
Starbuzz
-
method
Pregunta 7
Pregunta
Observable is a ___ not a interface [blank_start]CLASS[blank_end]
Ron was both an Observer and a __ [blank_start]SUBJECT[blank_end]
You say you want to keep your coupling ___ [blank_start]Loose[blank_end]
Implements this method to get notified [blank_start]UPDATE[blank_end]
Jill got one of her own [blank_start]JOB[blank_end]
CurrentConditionsDisplay implements this interface [blank_start]OBSERVER[blank_end]
He says you should go for it [blank_start]DEVILLISTENER[blank_end]
How to get yourself off the Observer list [blank_start]REMOVEOBSERVER[blank_end]
__ can manage u-your observers for you [blank_start]OBSERVABLE[blank_end]
Java framework with a lot of observers [blank_start]SWING[blank_end]
Weather o rama’s [blank_start]CEO[blank_end]
nemed after this kind of storm [blank_start]HURRICANE[blank_end]
You forgot this if you’re not getting notified when you think you should be [blank_start]SET CHANGED[blank_end]
Observers like to be ___ when something new happens [blank_start]NOTIFIED[blank_end]
The WeatherData class___ the Subject interface [blank_start]IMPLEMENTS[blank_end]
One subject likes to talk to ___ observers [blank_start]MANY[blank_end]
He didn’t want any more ints, so he removed himself [blank_start]MOUSE[blank_end]
CEO almost forget the ___ display index [blank_start]HEAT[blank_end]
Don’t coun’t on this for notification [blank_start]ORDER[blank_end]
Subject initially wanted to ___ al the data to Observer down [blank_start]PUSH[blank_end]
Temperature, humidity and___ [blank_start]PRESSURE[blank_end]
Observers are __ on the Subject [blank_start]DEPENDENT[blank_end]
Program to an __ not an implementation [blank_start]INTERFAC[blank_end]
E A subject is similar to a __ [blank_start]PUBLISHER[blank_end]
Respuesta
-
CLASS
-
SUBJECT
-
Loose
-
UPDATE
-
JOB
-
OBSERVER
-
DEVILLISTENER
-
REMOVEOBSERVER
-
OBSERVABLE
-
SWING
-
CEO
-
HURRICANE
-
SETCHANGED
-
NOTIFIED
-
IMPLEMENTS
-
MANY
-
MOUSE
-
HEAT
-
ORDER
-
PUSH
-
PRESSURE
-
DEPENDENT
-
INTERFACE
-
PUBLISHER