Question: Create a HPP file and a CPP file in c++ Programming.prompt/instructions Create a class that represents a Date. A Date object has the following information:

Create a HPP file and a CPP file in c++

Create a HPP file and a CPP file in c++ Programming.prompt/instructions Create

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, 2020

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!