Object-Oriented Design Principles Flashcards
In which pattern does a centralized class a method instantiate and return a class instance, commonly referencing either a specific subclass or shared interface?
Factory Design Pattern
In a composition relationship, which phrase describes how interface modifications to a container class affects the interface of its contained class?
loosely coupled
In the Factory design pattern, which type of coupling exists between the factory and product classes?
Loose coupling
In which object-oriented mechanism do subclasses provide unique implementation to methods in a superclass?
class inheritance
Which UML relationship is a type of class association that uses strong aggregation to represent a “whole-part” relationship?
Composition
In which two relationships can implementation found in multiple classes be aggregated?
Composition and generalization
Which types can implement the Singleton pattern?
Concrete classes and enumerations
Which three components are contained by classes that implement the Singleton design pattern?
A private constructor, a static member referencing the instance, and a public static accessor method returning that reference
Which interface member can be hidden in a class or subinterface?
Constants
Which UML relationship is a type of class association that uses weak aggregation to represent a “whole-part” relationship?
Aggregation
In class inheritance, which phrase describes how interface modification to a superclass affects the interface of its subclasses?
tightly coupled
In a composition relationship between classes, which phrase describes how an instance forwards method invocations to another class instance?
request-forwarding
In which pattern is a data-related class is concerned only with storage and read/write access to its instance members?
Transfer Object
Which design pattern is implemented by a class that restricts instantiation to only a single instance?
Singleton
What is another term for the Factory Method design pattern?
Virtual Constructor