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;
21 Cards in this Set
- Front
- Back
Simple Factory |
--"static" class with 1 or more builder methods --builder methods: accept parameters, makes decision, creates an object and returns |
|
Abstraction |
--simplify --well named, coherent, minimal, complete |
|
Separation |
separating interface from implementation interface: visible, external, must be understood to use the software implementation: hidden, internal |
|
Encapsulation |
"keeping all the stuff that works together in the same spot" |
|
Information Hiding |
Hiding details by only publicly exposing methods that are unlikely to change and keeping the rest private |
|
Inheritance |
building a new class based on an old one |
|
Polymorphism |
using the same code with different classes of data
ie: for (vehicle v : myVehicles) v.move(); |
|
Composition |
an organized collection of objects interactive to achieve a coherent, common behavior |
|
Composition: association |
a parts-whole relationship in which the "whole" is defined by the "parts" and the relationships among the parts. |
|
Composition: aggregation |
a composition in which the "whole" subsumes and conceals its constituent "parts"
hiding parts of the composition |
|
Interface |
a named collection of method definitions without implementations
a type; defines methods. never implements; a class can implement multiple interfaces |
|
Interface Polymorphism |
Multiple classes may implement the same interface and a single class may implement one or more interfaces
Define how a class should respond |
|
Abstract Class vs Interface |
an abstract class is a class that cannot be instantiated but must be inherited from. an abstract class may be fully implemented, but is more usually partially implemented.
an interface is a totally abstract set of members that can be thought of as defining a contract for conduct. implementation is left completely to developer. |
|
Delegation |
a relationship between objects where one object forwards certain method calls to another objectD |
|
Design Pattern: Strategy |
Lets you build software as a loosely coupled collection of interchangeable parts
-define family of algorithms -encapsulate each one -make them interchangeable recognized by: may replace multiple if statements, may be a group of impl classes |
|
Factory |
recognized by: if statements with .equals, then return a certain kind of object |
|
Abstract Factory |
defines a technique where we create a set of individual factories with a common theme |
|
Factory Method |
defines a technique where we define an abstract method for creating objects in our simple factory, and then create subclasses that override that method to specify the actual types of objects that will be created
recognized by: extends rather than implements abstract method in the original factory class |
|
Facade |
specifies the creation of a class with a unified interface to a set of interfaces
makes the subsystem easy to use, decouples classes
recognized by: often singletons, using a "manager" class |
|
Singleton |
restricts instantation of a class to one object
recognized by: private constructor final class getInstance method |
|
Data Transfer Object |
only contains data, a constructor, no methods, holds data
Recognized by: lack of methods public data |