Question: in java Create a TimeSpan object with parameter 3 and 4 0 ( you are passing 3 and 4 0 to your TimeSpan class constructor

in java Create a TimeSpan object with parameter 3 and 40(you are passing 3 and 40 to your TimeSpan class constructor to initialize class variables, hours and minutes)
print out current time - Your code should print 3h:40m
add 1 hour and 50 minutes to the TimeSpan object you created in question #1 and print the current time again - Your code should print 5h:30m
Create another TimeSpan object with parameter 5 and 35(you are passing 5 and 35 to your TimeSpan class constructor to initialize class variables, hours and minutes)
print out current time of your second TimeSpan object - Your code should print 5h:35m
add 4 hours and 100 minutes to the TimeSpan object you created in question #4 and print the current time again - Your code should print 11h:15m.
Call your setter to set your second object's hours to 7
Call your setter to set your second object's minutes 45
Call your getter to print your second object's hours
Call your getter to print your second object's minute

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 Databases Questions!