Add undo/redo behavior to the calculator. Because the Expression class code is complex, build a test harness that checks undo works by randomly updating expressions, and verifying that undo restores expressions to their previous state. Use beginUndoGrouping and endUndoGrouping to demarcate each undo step.
You are currently reading a PREVIEW of this book.
Get instant access to over
$1 million worth of books and videos.