Question: Step 1 : Inspect the UndoCommand abstract base class The read - only UndoCommand.h file declares the UndoCommand abstract base class. The UndoCommand class represents
Step : Inspect the UndoCommand abstract base class
The readonly UndoCommand.h file declares the UndoCommand abstract base class. The UndoCommand class represents a command object: an object that stores all needed information to execute an action at a later point in time. For this lab, a command object stores information to undo a grocery list change made by the user.
Step : Inspect the incomplete GroceryList class
The GroceryList class is declared in GroceryList.h Two member variables are declared:
listItems: A vector of strings for list items
undoStack: A stack of UndoCommand pointers for undo commands
Note that the AddWithUndo member function is already implemented. The function adds a new item to the list and pushes a new RemoveLastCommand object onto the undo stack.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
