Answered step by step
Verified Expert Solution
Question
1 Approved Answer
in C++ Programming.prompt/instructions Create a class that represents a Date. A Date object has the following information: month as a number from 1 - 12
in C++
Programming.prompt/instructions Create a class that represents a Date. A Date object has the following information: month as a number from 1 - 12 day as a number from 1-31 year as a number that is not negative The Date class has the following functions: getMonth() o Description: returns the month from the object in number form getDay() o Description: returns the day from the object getYear() o Description: returns the year from the object set Month(int new_month) o Assigns the new_month value to the object's month o This function needs to make sure the new_month is a number from 1 - 12 setMonth(string new_month) o This function takes in the new_month as a 3 character string, such as JAN or MAR and stores the appropriate number in for the object's month setDay(int new_day) o This function assigns the new_day value to the object's day. o This function needs to make sure the day is a value from 1 - 31 set Year(int new_year) This function assigns the new year value to the object's year. o This function needs to make sure the year is a value >= 1 printDateNumericall) o This function prints the date in the following format: MM-DD-YYYY printDate() o This function prints the date using the month name as in the following example: January 1, 2020Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started