logistic_guy
Full Member
- Joined
- Apr 17, 2024
- Messages
- 669
Create class DateAndTime that combines the modified Time2 class of Exercise \(\displaystyle 8.7\) and the modified Date class of Exercise \(\displaystyle 8.8\). Modify method incrementHour to call method nextDay if the time is incremented into the next day. Modify methods toString and toUniversalString to output the date in addition to the time. Write a program to test the new class DateAndTime. Specifically, test incrementing the time to the next day.