Question: Object Oriented Programming Question Please Answer all the question and write the code in C++ 9.7 (Enhancing Class Time) Modify the Time class of Figs.
Object Oriented Programming Question
Please Answer all the question and write the code in C++

9.7 (Enhancing Class Time) Modify the Time class of Figs. 9.4 0-9.5to include a tick member function that increments the time stored in a Time object by one second. Write a program that tests the tick member function in a loop that prints the time in standard format during each iteration of the loop to illustrate that the tick member function works correctly. Be sure to test the following cases: a. Incrementing into the next minute b. Incrementing into the next hour C. Incrementing into the next day (i.e., 11:59:59 PM to 12:00:00 AM) 9.8 (Enhancing Class Date) Modify the Date Class of Figs. 9.13 -9.14 to perform error checking on the initializer values for data members month, day and year. Also, provide a member function nextDay to increment the day by one. Write a program that tests function nextDay in a loop that prints the date during each iteration to illustrate that nextDay works correctly. Be sure to test the following cases: a. Incrementing into the next month. b. Incrementing into the next year 9.9 (Combining Class rime and Class Date) Combine the modified rime class of Exercise 9.7 and the modified Date class of Exercise 9.8 into one class called DateAndTime . (in Chapter 11 , we'll discuss inheritance, which will enable us to accomplish this task quickly without modifying the existing class definitions.) Modify the tick function to call the nextDay function if the time increments into the next day. Modify functions printstandard and printUniversal to output the date and time. Write a program to test the new clasS DateAndTime. Specifically test incrementing the time into the next day 9.7 (Enhancing Class Time) Modify the Time class of Figs. 9.4 0-9.5to include a tick member function that increments the time stored in a Time object by one second. Write a program that tests the tick member function in a loop that prints the time in standard format during each iteration of the loop to illustrate that the tick member function works correctly. Be sure to test the following cases: a. Incrementing into the next minute b. Incrementing into the next hour C. Incrementing into the next day (i.e., 11:59:59 PM to 12:00:00 AM) 9.8 (Enhancing Class Date) Modify the Date Class of Figs. 9.13 -9.14 to perform error checking on the initializer values for data members month, day and year. Also, provide a member function nextDay to increment the day by one. Write a program that tests function nextDay in a loop that prints the date during each iteration to illustrate that nextDay works correctly. Be sure to test the following cases: a. Incrementing into the next month. b. Incrementing into the next year 9.9 (Combining Class rime and Class Date) Combine the modified rime class of Exercise 9.7 and the modified Date class of Exercise 9.8 into one class called DateAndTime . (in Chapter 11 , we'll discuss inheritance, which will enable us to accomplish this task quickly without modifying the existing class definitions.) Modify the tick function to call the nextDay function if the time increments into the next day. Modify functions printstandard and printUniversal to output the date and time. Write a program to test the new clasS DateAndTime. Specifically test incrementing the time into the next day
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
