Robert Larson

  • Home
  • About Me
  • Contact Me
  • Product Recommendations
  • Client Portal

Software Engineering Blog

designpatterns

Builder Pattern using C++ (NFL Scheduler Example)

August 2, 2017 by Robert Larson

What is the Builder Pattern? The definition of the Builder Pattern from both Design Patterns: Elements of Reusable Object-Oriented Software and Head First Design Patterns: A Brain-Friendly Guide is The Builder Pattern allows you to encapsulate the construction of a product and allow it to be constructed in steps. Builder Pattern Class Diagram Explained The … [Read more…]

Share this:

  • Click to share on X (Opens in new window) X
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to email a link to a friend (Opens in new window) Email

Like this:

Like Loading...
Posted in: c++, Design Patterns Tagged: #cplusplus, designpatterns

Proxy Pattern using C++ (Zoo Example)

May 26, 2017 by Robert Larson
Proxy Pattern using c++ Zoo example

What is the Proxy Pattern? The definition of the Proxy Pattern from both Design Patterns: Elements of Reusable Object-Oriented Software and Head First Design Patterns: A Brain-Friendly Guide is The Proxy Pattern provides a surrogate or placeholder for another object to control access to it. Proxy Pattern Class Diagram Explained The above class diagram represents … [Read more…]

Share this:

  • Click to share on X (Opens in new window) X
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to email a link to a friend (Opens in new window) Email

Like this:

Like Loading...
Posted in: c++, Design Patterns Tagged: #cplusplus, #cpp, #designpatterns #cplusplus, c++, designpatterns

State Pattern using C++ (Music Player Example)

May 11, 2017 by Robert Larson

What is the State Pattern? The definition of the State Pattern from both Design Patterns: Elements of Reusable Object-Oriented Software and Head First Design Patterns: A Brain-Friendly Guide is The State Pattern allows an object to alter its behavior when its internal state changes. The object will appear to change its class. State Pattern Class … [Read more…]

Share this:

  • Click to share on X (Opens in new window) X
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to email a link to a friend (Opens in new window) Email

Like this:

Like Loading...
Posted in: c++, Design Patterns Tagged: #cplusplus, #cpp, c++, designpatterns

Composite Pattern using C++ (Librarian Book Collection Example)

May 1, 2017 by Robert Larson

What is the Composite Pattern? The definition of the Composite Pattern from both Design Patterns: Elements of Reusable Object-Oriented Software and Head First Design Patterns: A Brain-Friendly Guide is The Composite Pattern allows you to compose objects into tree structures to represent part-whole hierarchies. Composite lets clients treat individual objects and compositions of objects uniformly. … [Read more…]

Share this:

  • Click to share on X (Opens in new window) X
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to email a link to a friend (Opens in new window) Email

Like this:

Like Loading...
Posted in: c++, Design Patterns Tagged: #cplusplus, designpatterns

Adapter Pattern using C++ (Robot Dog)

April 5, 2017 by Robert Larson

What is the Adapter Pattern? The definition of the Adapter Pattern from both Design Patterns: Elements of Reusable Object-Oriented Software and Head First Design Patterns: A Brain-Friendly Guide is The Adapter Pattern converts the interface of a class into another interface clients expect. Adapter lets classes work together that couldn’t otherwise because of incompatible interfaces. … [Read more…]

Share this:

  • Click to share on X (Opens in new window) X
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to email a link to a friend (Opens in new window) Email

Like this:

Like Loading...
Posted in: c++, Design Patterns Tagged: #cplusplus, #cpp, c++, designpatterns

Command Pattern using C++ (Basketball Scoreboard)

March 31, 2017 by Robert Larson

What is the Command Pattern? The definition of the Command Pattern from both Design Patterns: Elements of Reusable Object-Oriented Software and Head First Design Patterns: A Brain-Friendly Guide is The Command Pattern encapsulates a request as an object, thereby letting you parameterize other objects with different requests, queue or log requests, and support undoable operations. … [Read more…]

Share this:

  • Click to share on X (Opens in new window) X
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to email a link to a friend (Opens in new window) Email

Like this:

Like Loading...
Posted in: c++, Design Patterns Tagged: #cplusplus, #cpp, designpatterns

Singleton Pattern using C++

March 13, 2017 by Robert Larson

What is the Singleton Pattern? The Singleton Pattern makes sure a class has only one instance and provides a way to access it globally. It’s typically preferred, within the development community, to find alternatives to using global access, if possible. What the Singleton Pattern does better than say, a global variable, is that it’s access … [Read more…]

Share this:

  • Click to share on X (Opens in new window) X
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to email a link to a friend (Opens in new window) Email

Like this:

Like Loading...
Posted in: c++, Design Patterns Tagged: c++, designpatterns

The Abstract Factory Pattern using C++ (Burger King vs. McDonalds Part 2)

March 7, 2017 by Robert Larson

What is the Abstract Factory Pattern? In a previous post, I described the Factory Method Pattern and provided a C++ code example. In this post I would like to provide information on another factory pattern, the Abstract Factory Pattern. Let’s jump right in and start with the Abstract Factory Pattern’s formal definition from “Head First … [Read more…]

Share this:

  • Click to share on X (Opens in new window) X
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to email a link to a friend (Opens in new window) Email

Like this:

Like Loading...
Posted in: c++, Design Patterns Tagged: c++, designpatterns

The Factory Method Pattern using C++ (Burger King vs. McDonalds)

February 27, 2017 by Robert Larson

What is the Factory Method Pattern? If you are looking for a way to encapsulate the creation of objects, factory patterns are just what you need. There are multiple factory patterns but in this post I will just be focusing on the Factory Method Pattern. It is a factory pattern so we should expect the … [Read more…]

Share this:

  • Click to share on X (Opens in new window) X
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to email a link to a friend (Opens in new window) Email

Like this:

Like Loading...
Posted in: c++, Design Patterns Tagged: c++, designpatterns

The Decorator Pattern using C++

February 21, 2017 by Robert Larson

What is the Decorator Pattern? Ever find yourself creating derived classes to add new or variant behavior from an existing class? I have. It seems like a good idea to start but can quickly become a complex maintenance nightmare. I have learned my lesson and avoid falling into that mindset when I need to add … [Read more…]

Share this:

  • Click to share on X (Opens in new window) X
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to email a link to a friend (Opens in new window) Email

Like this:

Like Loading...
Posted in: c++, Design Patterns Tagged: c++, designpatterns
1 2 Next »

Recent Posts

  • March Madness 2019 – Weighted Random Bracket Generator
  • Gifts Ideas for Software Developers 2018-2019
  • March Madness 2018 – Second Chance Weighted Random Bracket Generator
  • March Madness 2018 – Weighted Random Bracket Generator
  • Builder Pattern using C++ (NFL Scheduler Example)

Archives

  • March 2019
  • November 2018
  • March 2018
  • August 2017
  • June 2017
  • May 2017
  • April 2017
  • March 2017
  • February 2017
  • January 2017

Follow me on Twitter

My Tweets

Copyright © 2025 Robert Larson.

Grace WordPress Theme by SiteChurch

%d