Question: In Java Given: 01/21/21 Due: 01/29/21 Points: 10 Purpose: Write a Java class Perform mathematical computations Description: - Create a class MyTime to represent a
In Java


Given: 01/21/21 Due: 01/29/21 Points: 10 Purpose: Write a Java class Perform mathematical computations Description: - Create a class MyTime to represent a time-of-day as 3 integer values representing hour of the day, minutes past the hour & seconds past the minute. Provide the following methods: - default constructor initializing constructor - an add: - seconds - minutes - hours Write a test program to read in a time-of-day as 3 integers representing hours, minutes, and seconds. Create a MyTime object with the given initial values. Also read in: - a 4th input of additional seconds - a 5th input of additional minutes - a 6th input of additional hours Recompute the time by adding the: additional seconds - additional minutes - additional hours Output: display the original time given - compute and display the new time by adding each of the: additional seconds - additional minutes - additional hours Example: Inputs: 5 59 32 30 12 5 Initial time: Plus 305 : Plus 12m: Plus 5h: 05:59:32 06:00:02 06:12:02 11:12:02 Notes: Nicely format and label your output. - You are to write and submit your own program. Read and follow the Programming Guidelines posted on otto. Programming - Programming guidelines E-mail your source code to Otto. * Read and follow the Email submission Guidelines on otto.* Programming -> Otto email. Check/Read the Status message sent from Otto. Always! *** = = = =
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
