Premium Partner

Software Construction: Design Patterns 1

Cards to learn the design patterns

Cards to learn the design patterns

Kartei Details

Karten 14
Sprache Deutsch
Kategorie Informatik
Stufe Universität
Erstellt / Aktualisiert 28.12.2019 / 11.01.2020
Lizenzierung Keine Angabe
<iframe src="" width="780" height="150" scrolling="no" frameborder="0"></iframe>

The Singleton Pattern (Definition)

The Singleton Pattern ensures a class has only one instance, and provides a global point of access to it.

Class Diagram of Singleton Pattern

Singleton Pattern Implementation Example (Eagerly created instance)

Eagerly created instance

The Adapter Pattern (Definition)

The Adapter Pattern converts the interface of a class into another interface the clients expect. Adapter lets classes work together that could not otherwise because of incompatible interfaces.

Class Diagram of Adapter Pattern

Adapter Pattern Implementation Example (Ducks & Turkeys)

The Observer Pattern (Definition)

The Observer Pattern defines a one-to-many dependency between objects so that when one object changes state, all of its dependents are notified and updated automatically.

Design Principle (Observer Pattern?)

Strive for loosely coupled designs between objects that interact.