Design Pattern Examples
Overview of object-oriented design patterns
MoveCommandNone Class Reference

Represents the Do Nothing command. This is the Null Object for this exercise. More...

Inheritance diagram for MoveCommandNone:
Inheritance graph
Collaboration diagram for MoveCommandNone:
Collaboration graph

Public Member Functions

 MoveCommandNone (string command)
 Constructor.
 
override void Execute ()
 Does nothing when executed (this is the Null Object, after all).
 
- Public Member Functions inherited from MoveCommand
 MoveCommand (string command, string commandName)
 Constructor.
 
void Show ()
 Display the move command and its name followed by a newline.
 
abstract void Execute ()
 Execute the command. Derived classes must implement this.
 

Additional Inherited Members

- Properties inherited from MoveCommand
string Name [get, private set]
 Name of the command (assigned in the class constructor).
 
string Command [get, private set]
 The command character from the original list of commands. Used when displaying the commands as opposed to when executing the commands (assigned in the class constructor).
 

Detailed Description

Represents the Do Nothing command. This is the Null Object for this exercise.

Definition at line 191 of file Null_Object.cs.

Constructor & Destructor Documentation

◆ MoveCommandNone()

MoveCommandNone ( string  command)
inline

Constructor.

Parameters
commandThe character representing the move in the original move list.

Definition at line 198 of file Null_Object.cs.

Member Function Documentation

◆ Execute()

override void Execute ( )
inlinevirtual

Does nothing when executed (this is the Null Object, after all).

Implements MoveCommand.

Definition at line 206 of file Null_Object.cs.


The documentation for this class was generated from the following file: