package lectures.undo_commands;
import util.annotations.WebDocuments;
import lectures.mvc.Counter;
@WebDocuments({"Lectures/UndoCommands.pptx", "Lectures/UndoCommands.pdf", "Videos/UndoCommands.avi"})
public class AnAddCounterCommand implements UndoableCommand {
Counter counter;
int addAmount;
public AnAddCounterCommand (Counter theCounter, int theAmount) {
counter = theCounter;
addAmount = theAmount;
}
public void execute() {counter.add(addAmount);}
public void undo() {counter.add(-addAmount);}
}