class object Create a Date class, representing a single calendar date. The Date
ID: 441215 • Letter: C
Question
class object
Create a Date class, representing a single calendar date. The Date class must include the following: Private member variables that hold information for the year, month number and day number. A public member function named SetDate. This takes integer arguments for year, month and day, in that order. If the numbers given are invalid (for instance, if the month isn't 1 through 12, or if the day number is too big*), print an error message and do NOT change the date. A public member function named DisplayNumerically. This prints out the date on a single line in the form MM/D DA'Y, using two digits for the month, day and all four digits of the year. Example: February 22 of this year would be displayed as 02/22/2012 A public member function named DisplayTextually. This prints out the date on a single line in the form [month name] [day number], [year]. Example: February 22, 2012 As above, also add code to main() to create a single Data variable and demonstrate it being used. 'When checking the day number, you may ignore leap years and assume February always has 28 days.Explanation / Answer
//hosted on my dropbox //rate and comment and I'll unhost //also comment if you have any questions // ( o_o) https://www.dropbox.com/s/q2gtz2hjaorwx18/classDateLeapYearNoCheck.txt
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.