Command DP
Use the Command pattern when you want to
(Adopted from: Design Patterns in XML Applications by Fabio Arciniegas A).
UML for undo: