A web calculator that demonstrates state pattern (and a little bit of ajax...) (CO539 Assignment2)