[SOLVED] SOLVED:Clock Class

20.00 $

Programming resource
Digital learning resource
Category:
Practical programming resource
Suitable for guided study and reference
Tutor guidance available when needed

Description

5/5 - (1 vote)

(25 points) 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 startTime to the current time, a method named start() that resets the startTime to the given time, a stop() method that sets the endTime to the given time and a getElapsedTime() method that returns the elapsed time in seconds. Create a TestClock class to construct a Clock instance and return the elapsed time. Command line arguments should be used to send the start and end times. You should use the java.time classes.Here is sample run: java TestClock 11:45:12 11:48:13 Elapsed time in seconds is: 181 Submission requirements: Your deliverables include all Java files (.java) and a single word (or PDF) document. The Java files should be named appropriately for your applications. Your word document should include screen captures showing the successful compiling and running of each application, and a detailed description of the test plan for each application. The screen captures should document your use of the IDE. The test plan should include the input, expected output, actual output and if the test case passed or failed. Submit your files to the Homework 4 assignment area no later than the due date listed in the calendar.

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.