Best writers. Best papers. Let professionals take care of your academic papers

Order a similar paper and get 15% discount on your first order with us
Use the following coupon "FIRST15"
ORDER NOW

25 points) Design a class named Clock. You should use your IDE for this exercise

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 Test Clock 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

Homework 4Before attempting this project, be sure you have completed all of the reading assignments, hands-onlabs, discussions, and assignments to date.(25 points) Design a class named Clock. You should use your IDE for this exercise. The class containsprivate data fields for startTime and stopTime, a no argument constructor that initializes the startTimeto 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.Here is sample run:java TestClock 11:45:12 11:48:13Elapsed time in seconds is: 181Grading Rubric:The following grading rubric will be used to determine your grade:AttributeExceedsMeetsDoes not meetDesign (5 points)(5 points)Exhibits proper use ofparameters, andselection of data typesall of the time.Employs correct andappropriate use ofprogrammingstructures (loops,conditionals, classesetc.) all of the time.Efficient algorithmsused all of the time.(3-4 points)Exhibits proper use ofparameters, andselection of data typesmost of the time.Employs correct andappropriate use ofprogrammingstructures (loops,conditionals, classesetc.) most of the time.Efficient algorithmsused most of the time.(0-2 points)Rarely exhibits properuse of parameters, andselection of data types.Rarely employs correctand appropriate use ofprogrammingstructures (loops,conditionals, classesetc.)Poorly structured andinefficient algorithms.Functionality (10points)(9-10 points)Extra effort wasapparent through theaddition of significantand additionalfunctionality beyondthe scope of theassignment.(7-8 points)Program fulfills mostfunctionality.Most requirementswere fulfilled.Screen capturesprovided(0-6 points)Program does not fulfillfunctionality.Few requirementswere fulfilled.
Background image of page 1
demonstrating thesuccessful compilingand running of theprogram.Test cases (5 points)(5 points)Test cases providecomprehensivecoverage of all codepaths.Discussion of run-timeerrors included.(3-4 points)Test cases providecoverage of most codepaths.Test cases results welldocumented providingpass/fail results foreach test case.(0-2 points)No or insufficient testcasesMinimal supportingevidence provided toverify testing actuallytook place.Java Style Guide (5points)(5 points)Code impeccably neatand well-organized.Extensive In-linecomments providingadditional insight intocode design andfunctionality(3-4 points)Header commentsinclude filename,author, date and briefpurpose of theprogram.In-line comments usedto describe majorfunctionality of thecode.Meaningful variablenames and promptsapplied.Class names arewritten inUpperCamelCase.Variable names arewritten inlowerCamelCase.Constant names are inwritten in All Capitals.Braces use K&R style.(0-2 points)Code rarely followsrecommended Javastyle guideSubmission requirements:
Background image of page 2

Show 

 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"