Java Class Modify class Time2 of Fig 8.5 to include a tick method that increments the time stored in a Time2 object by one second. Provide method incrementMinute to increment the minute by one and method incrementHour to increment hour by one. The Time2 object should always remain in a consistent state. Write a progam that tests the tick method, the incrementMinute method and the incrementHour method to ensure that they work correctly. Be sure to test the following cases:
a. incrementing to the next minute
b. incrementing to the next hour
c. incrementing to the next day