Question: C++ Switch Statment Write a program that allows us to create a Date object, display it and check if it is a leap year 1.
C++ Switch Statment
Write a program that allows us to create a Date object, display it and check if it is a leap year 1. Constructor takes 3 integer parameters corresponding to day, month and year 2. getDay, getMonth, and getYear class functions return the corresponding value of the date object 3. display prints the date object as "1-January-1900" 4. setDay, setMonth, setYear class functions set the corresponding value 5. isLeapYear returns true if the date is a leap year, false otherwise. A year is a leap year if it is evenly divisible by 4. BUT, if the year can be evenly divided by 100, it is NOT a leap year, unless it is also evenly divisible by 400. Then it is a leap year. 6. daysInMonth returns the maximum number of days in that month. January has 31 days, February 28 or 29, March has 31, etc A sample testDate function and its output is provided below to help you design and test your date class. You should write additional test function to test your program. You can assume the input is valid (i.e. day, month and year in the correct rang

roid teatDate11 Date d1804 (2, 2, 1804) Date d1805 (0, 2. 1805): Date di900 (20., 1900) Date d2000 (20., 2000) dt 804.diaplayO cout 1804 ap, di by but not 100: d1804.itaspearndl cout
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
