HFDP

Read HFDP online

6: 

https://ucsb-cs56-pconrad.github.io/hfdp/HFDP_Chapter_6/

TODO: Fill in HFDP_Chapter_6.md with notes for Chapter 6 of HFDP.

  1. The Command Pattern: Encapsulating Invocation

Free hardware! Let’s check out the Remote Control…

Taking a look at the vendor classes

Cubicle Conversation

Meanwhile, back at the Diner…, or, A brief introduction to the Command Pattern

Let’s study the interaction in a little more detail…

The Objectville Diner roles and responsibilities

From the Diner to the Command Pattern

Our first command object

Using the command object

Creating a simple test to use the Remote Control

The Command Pattern defined

The Command Pattern defined: the class diagram

Assigning Commands to slots

Implementing the Remote Control

Implementing the Commands

Putting the Remote Control through its paces

Time to write that documentation…

What are we doing?

Time to QA that Undo button!

Using state to implement Undo

Adding Undo to the CeilingFan commands

Get ready to test the ceiling fan

Testing the ceiling fan…

Every remote needs a Party Mode!

Using a macro command

The Command Pattern means lots of command classes

Simplifying the Remote Control with lambda expressions

Simplifying even more with method references

Test the remote control with lambda expressions

More uses of the Command Pattern: queuing requests

More uses of the Command Pattern: logging requests

Tools for your Design Toolbox

https://ucsb-cs56-pconrad.github.io/hfdp/HFDP_Chapter_6/