Skip to content

Repository for assignments, examples, and project for the CS 542 Design Patterns class from CSUSM

Notifications You must be signed in to change notification settings

AdrianaCaetano/DesignPatterns

Repository files navigation

DesignPatterns

Repository for assignments, examples, and project for the CS 542 Design Patterns class from CSUSM

Concept:

Design Patterns are descriptions of communicating objects and classes that are customized to solve a general design problem in a particular context.

Design Pattern is a general repeatable solution to a commonly occurring problem in software design, a description for how to solve a problem that can be customizable.

Design Techniques:

  1. Favor composition over inheritance to promote encapsulation - instead of creating child classes

  2. Use interface classes for providing a common interface. Program through interface, not in the concrete level. Refer through the interface, not directly.

Classification by Purpose:

  1. Creational Patterns: for object creation

  2. Structural Patterns: for compositions of classes and objects

  3. Behavioral Patterns: for interactions of classes and objects

Each pattern has 4 essential elements:

  • name
  • problem (application scope, what type of problem it addresses),
  • solution (how this DP works),
  • consequences (costs, limitations, and benefits)

Folder Structure: Concept + Code example + Diagram

Disclosure

All information is based on my class notes and slides. I copied it here for my future reference. For more reliable sources, please check the book cited on reference.

Reference

E. Gamma, R. Helm, Ralph E. Johnson, J. Vlissides. Design patterns: elements of reusable object-oriented software. Addison-Wesley Professional, 1995.

About

Repository for assignments, examples, and project for the CS 542 Design Patterns class from CSUSM

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages