CPSC 310 Exam #2 with Complete Solutions
Adapter Pattern - ANSWER-(S) Wraps an object and provides a different interface to it
Behavioral Pattern - ANSWER-Involve how classes and objects interact and distribute
responsibility
Checked Exception - ANSWER-Non-programmer error; checked at compile time
Command Pattern - ANSWER-(B) Encapsulates a request as an object
Composite Pattern - ANSWER-(S) Clients treat collections of objects and individual
objects uniformly
Creational Pattern - ANSWER-Involve object creation and decouple a client from the
objects it needs to instantiate
Decorator Pattern - ANSWER-(S) Wraps an object to provide new behavior
Design Pattern - ANSWER-Description of communicating objects and classes that are
customized to solve a general design problem in a particular context.
Facade Pattern - ANSWER-(S) Simplifies the interface of a set of classes
Factory Method Pattern - ANSWER-(C) Subclasses decide which concrete classes to
create
Integrated Development Environment (IDE) - ANSWER-Comprehensive tool for
software development
Iterator Pattern - ANSWER-(B) Provides a way to traverse a collection of objects without
exposing its implementation
Observer Pattern - ANSWER-(B) Allows objects to be notified when state changes
Observer Pattern - ANSWER-Defines a
Proxy Pattern - ANSWER-(S) Wraps an object to control access to it
Singleton Pattern - ANSWER-(C) Ensures one and only one object is created
State Pattern - ANSWER-(B) Encapsulates state-based behaviors and uses delegation
to switch between behaviors
Static Code Analysis - ANSWER-The process of analyzing source code without actually
running it.
Adapter Pattern - ANSWER-(S) Wraps an object and provides a different interface to it
Behavioral Pattern - ANSWER-Involve how classes and objects interact and distribute
responsibility
Checked Exception - ANSWER-Non-programmer error; checked at compile time
Command Pattern - ANSWER-(B) Encapsulates a request as an object
Composite Pattern - ANSWER-(S) Clients treat collections of objects and individual
objects uniformly
Creational Pattern - ANSWER-Involve object creation and decouple a client from the
objects it needs to instantiate
Decorator Pattern - ANSWER-(S) Wraps an object to provide new behavior
Design Pattern - ANSWER-Description of communicating objects and classes that are
customized to solve a general design problem in a particular context.
Facade Pattern - ANSWER-(S) Simplifies the interface of a set of classes
Factory Method Pattern - ANSWER-(C) Subclasses decide which concrete classes to
create
Integrated Development Environment (IDE) - ANSWER-Comprehensive tool for
software development
Iterator Pattern - ANSWER-(B) Provides a way to traverse a collection of objects without
exposing its implementation
Observer Pattern - ANSWER-(B) Allows objects to be notified when state changes
Observer Pattern - ANSWER-Defines a
Proxy Pattern - ANSWER-(S) Wraps an object to control access to it
Singleton Pattern - ANSWER-(C) Ensures one and only one object is created
State Pattern - ANSWER-(B) Encapsulates state-based behaviors and uses delegation
to switch between behaviors
Static Code Analysis - ANSWER-The process of analyzing source code without actually
running it.