//Use the Command Pattern.
//The Runner class creates an instance of the Page and Print command classes.

ICommand paste = new Paste();
ICommand print = new Print();

Invoker document = new Invoker("Greetings");

document.ClipBoard = "Hello, everyone";
document.Execute(paste);
document.Execute(print);
document.Undo(paste);

document.ClipBoard = "Bonjour, mes amis";
document.Execute(paste);
document.Redo(paste);
document.Undo(paste);

document.ClipBoard = "Guten morgen, meine Freunde";
document.Redo(paste);
document.Execute(print);
document.Undo(print);

document.Log();