Answered You can hire a professional tutor to get the answer.

QUESTION

Can I please get some assistance on this! I'm a newbie to this computer science thing and I'm struggling a lot.

Design a class called My_Date. The class has three integer attributes: month, day, year, and a stringattribute month_name. Define mutator (set) and accessor (get) functions for each attribute. Define adefault 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/2020printDate2(): December 25, 2020My_Date()void setMonth(int)void setDay(int)void setYear(int)void setMonth_Name() //no parameter for set nameint 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. 29should 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.

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question