I am going to create an application in that i have to implement an Undo and Redo feature. In the application there will be multiple objects located on stage and
the simplest way I can think of is creating an action object, where you have the old state and the new state and the object that changed.
every time an action that would get an undo feature is fired, fill out this data in the action object
when you hit undo, revert to the before state of the object and push the action into the redo stack.
This should be able to handle most common changes. Things like delete/undelete need a little extra tweaking. I would just put in all properties at the time of deletion, and use a create function when handling the undo.
I would suggest using a string for parameters and value combinations for the before and after states, that way you can handle additional functions without changing the undo/redo functionality.
This is more of a quick and dirty way, you can also do it using design patterns and proper OOP ways of dealing with this as others have mentioned.