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

java 1. 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)
2. print out current time - Your code should print 3h:40m
3. 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
4. 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)
5. print out current time of your second TimeSpan object - Your code should print 5h:35m
6. 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.
7. Call your setter to set your second object's hours to 7
8. Call your setter to set your second object's minutes 45
9. Call your getter to print your second object's hours
10. 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!