Question: 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

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 52

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!