Design a class
that represents a Stopwatch
. We want to be able to start
and stop
it.
There's no need to track the time that has passed between a start
and stop
action.
But we should be able to tell the consumer of this class
whenever the Stopwatch
has started,
is already running, stopped and is already stopped on the console.
You should be able to generate this output on the console:
Stopwatch started
Has already started
Stopwatch stopped
Has already stopped
Spend 20 minutes on this and if you don't succeed, take a break or reach out for help.
Go here to compare your solution.