Design a class named clock you should use your ide for this


Design a class named Clock. You should use your IDE for this exercise. The class contains private data fields for startTime and stopTime, a no argument constructor that initializes the start Time to the current time, a method named start() that resets the startTime to the given time, a stop() methodthat sets the endTime to the given time and a getElapsedTime() method that returns the elapsed time inseconds. Create a TestClock class to construct a Clock instance and return the elapsed time. Commandline arguments should be used to send the start and end times. You should use the java.time classes.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Design a class named clock you should use your ide for this
Reference No:- TGS01384857

Now Priced at $20 (50% Discount)

Recommended (95%)

Rated (4.7/5)