This project is a small todo list app that allows users to add, remove and edit todo list items. The whole purpose of this app is to showcase which patterns to use for undoing/redoing user actions, without changing existing domain classes.
- Go to the console and enter
java -version
. It should show that Java is installed and a version >= 8. You can get Java here. - Download the zip file contained in the
binaries
folder of this project, and unzip it to your hard drive. - Using the console, go to the unzipped folder on your hard drive. Enter the
bin
folder. - Run the
todolist
script (Unix) or thetodolist.bat
script (Windows).
- The TodoList class represents the domain knowledge: you can add, remove and edit items. A simple, zero-based index called itemNumber is used to access specific items.
- The UndoableTodoList class is an adapter to the
TodoList
class that implements the same interface. Besides delegating to its ownTodoList
instance, it also keeps tracks of undo/redo commands.