Question: Using Python: 1. (Save it to a new .py file) Design a stopwatch to support the similar functionalities as the Stopwatch app on either iOS
Using Python:
1. (Save it to a new .py file)
Design a stopwatch to support the similar functionalities as the Stopwatch app on either iOS or Android.
You StopWatch should be in one of the three states.
At initial state, the getElapsedTime method returns 0. The start method sets the start time and changes the state to running state. Other methods have no effect.
At running state, the getElapsedTime method returns the difference between current time and start time. The stop method sets the end time and changes the state to stop state. Other methods have no effect.
At stop state, the getElapsedTime method returns the difference between end time and start time. The reset method changes the state to initial state. The startmethod changes the state to running state, without updating the start time. Other methods have no effect.
Write a test function to test all functionalities.
2. (Save it to a new .py file)
Add the Lap functionality to your StopWatch. Refer the stopwatch app on your iOS or Android.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
