Can I Please Get Some Assistance On This! I’M A Newbie To This Computer Science Thing And I’M Struggling A

0 Comment

Design a class called My_Date. The class has three integer attributes: month, day, year, and a string
attribute month_name. Define mutator (set) and accessor (get) functions for each attribute. Define a
default constructor which initializes date to 1/1/1900. There are two more public member functions,
printDate1() and printDate2() which print dates in the following formats:
printDate1(): 12/25/2020
printDate2(): December 25, 2020
void setMonth(int)
void setDay(int)
void setYear(int)
void setMonth_Name() //no parameter for set name
int getMonth()
int getDay()
int getYear()
string getMonth_Name()
void printDate1()
void printDate2()
Input Validation:
Do not accept values for the day greater than 31 or less than 1 for month 1 (Jan), 3 (Mar), 5
(May), 7 (Jul), 8(Aug), 10 (Oct), and 12 (Dec)
Do not accept values for the day greater than 30 or less than 1 for month 4 (Apr), 6 (Jun), 9 (Sep),
and 1 1 (Nov)
For month 2 (Feb), check if a year is a leap year. If an input year is a leap year then Feb. 29
should be a valid date, otherwise it’s invalid.
Bonus feature (5 points):
If user input an invalid day or month, ask user to input again until the input value is valid.Engineering Technology