public class StopWatch { // private data fields private float startTime; private float endTime; // getter methods public float getStartTime(){ return startTime; } public float getEndTime() { return endTime; } // no - arg constructor public StopWatch() { } // start method public void start(float startTime) { this.startTime = startTime; } //stop method public void stop(float endTime) { this.endTime = endTime; } // elpsed time method public float getElapsedTime() { return ((endTime - startTime) * 1000); } }