A simple counter
n
A simple counter’s responsibilities:
u
u
Know (one query):
u
the value of the count
u
Do (two commands):
u
set the count to 0
u
increment the count by 1