C322 OOP Design Patterns

0.0(0)
studied byStudied by 0 people
full-widthCall with Kai
GameKnowt Play
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/29

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

30 Terms

1
New cards

Simple Factory

CREATIONAL

class or method with a large conditional, determines which object to instantiate and return

2
New cards

Factory Method

CREATIONAL

provides an interface for creating objects in a superclass, but allows subclasses to alter the type of objects that will be created

3
New cards

Abstract Factory

CREATIONAL

lets you produce families of related objects without specifying their concrete classes

4
New cards

Prototype

CREATIONAL

lets you copy existing objects without making your code dependent on their classes

5
New cards

Builder

CREATIONAL

lets you construct complex objects step by step. The pattern allows you to produce different types and representations of an object using the same construction code

6
New cards

Singleton

CREATIONAL

lets you ensure that a class has only one instance, while providing a global access point to this instance

7
New cards

Object Pool

STRUCTURAL

improves performance and resource management by reusing expensive-to-create objects instead of repeatedly creating and destroying them

8
New cards

Adapter

STRUCTURAL

allows objects with incompatible interfaces to collaborate

9
New cards

Bridge

STRUCTURAL

lets you split a large class or a set of closely related classes into two separate hierarchies—abstraction and implementation—which can be developed independently of each other

10
New cards

Composite

STRUCTURAL

lets you compose objects into tree structures and then work with these structures as if they were individual objects

11
New cards

Decorator

STRUCTURAL

lets you attach new behaviors to objects by placing these objects inside special wrapper objects that contain the behaviors; maintains original type

12
New cards

Facade

STRUCTURAL

provides a simplified interface to a library, a framework, or any other complex set of classes

13
New cards

Flyweight

STRUCTURAL

lets you fit more objects into the available amount of RAM by sharing common parts of state between multiple objects instead of keeping all of the data in each object

14
New cards

Null Object

BEHAVIORAL

avoids returning a null value by using an object with no behavior

15
New cards

Strategy

BEHAVIORAL

lets you define a family of algorithms, put each of them into a separate class, and make their objects interchangeable

16
New cards

Template Method

BEHAVIORAL

defines the skeleton of an algorithm in the superclass but lets subclasses override specific steps of the algorithm without changing its structure

17
New cards

Observer

BEHAVIORAL

lets you define a subscription mechanism to notify multiple objects about any state change in the object they're observing

18
New cards

Iterator

BEHAVIORAL

lets you traverse elements of a collection without exposing its underlying representation (list, stack, tree, etc.)

19
New cards

Command

BEHAVIORAL

turns a request into a stand-alone object that contains all information about the request

20
New cards

Mediator

BEHAVIORAL

lets you reduce chaotic dependencies between object by restricting direct communications between the objects and forcing collaboration via a mediator object

21
New cards

Visitor

BEHAVIORAL

lets you separate algorithms from the objects on which they operate

22
New cards

Proxy

BEHAVIORAL

lets you provide a substitute or placeholder for another object, controlling access to the original object

23
New cards

Memento

BEHAVIORAL

lets you save and restore the previous state of an object without revealing the details of its implementation

24
New cards

Interpreter

BEHAVIORAL

defines a grammatical representation for a language and provides an interpreter to handle this grammar; dynamic translation, early AI

25
New cards

Chain of Reponsibility

BEHAVIORAL

lets you pass requests along a chain of handlers; each handler decides either to process the request or to pass it to the next handler in the chain

26
New cards

State

BEHAVIORAL

lets an object alter its behavior when its internal state changes. It appears as if the object changed its class

27
New cards

Model View Controller

COMBINATION

a compound pattern consisting of the Observer, Strategy and Composite patterns; fully decoupled

28
New cards

3 Factories

PBS

6 CREATIONAL

Simple Factory

Factory Method

Abstract Factory

Prototype

Builder

Singleton

29
New cards

ABCDFF OP

7 STRUCTURAL

Adapter

Bridge

Composite

Decorator

Facade

Flyweight

Object Pool

30
New cards

STOIC MVP MISC. NO

13 BEHAVIORAL

Strategy

Template

Observer

Interpreter

Command

Mediator

Visitor

Proxy

Memento

Iterator

State

Chain of Responsibility

Null Object