Question: 5.8 Consider a class DateToDay that contains a method char* convert (int, int, int). It converts the date into day, and the precondition is that




5.8 Consider a class DateToDay that contains a method char* convert (int, int, int). It converts the date into day, and the precondition is that all three integers of the date are two-digit integers, representing the month, day of the month, and a year (see the enclosed code). Change the precondition of convert in such a way that the year is a four-digit integer, like 2010. Take into account the corresponding quirks of the Gregorian calendar. class DateToDay public: char* convert (int dd, int mm, int yy) if (!( dd >0&& dd 0&& mm
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
