The private member function DayOfYear::check_date in Display 10.4
allows some illegal dates to get through, such as February 30. Redefine the member function DayOfYear::check_date so that it ends the program
whenever it finds any illegal date. Allow February to contain 29 days, so
you account for leap years. (Hint: This is a bit tedious and the function
definition is a bit long, but it is not very difficult.).
Sorry the answer is not available at the moment…
If you are able to find the answer, please make sure to post it here. So that your Juniors have smile on their lips and feel happy.
Spread the 'tradition of sharing'.