I need to write a date class program that checks for a string month, int day, and int year. I have tried many ways to write the program but i cant figure it out. Also, i need to output the date instance four different times like in these formats....1/1/2001 January 1, 2001 2001-1-1 2001-jan-1, that should be used in a seperate print member function.
class Date
{
private:
string month;
int day;
int year;
bool isMonthValid(string m);
bool isDayValid(int dy);
bool isYearValid(int yr);
public:
Date(string m, int d, int y);
I need to write a program that outputs the date the user inputs. I need to write the class header file which has three private member variables, string month, int day, int year. I need to write private member functions to check whether the string month array is one of the months the user has input and then a public member function that checks the private member functions. Also, i need to display the the date in four formats using the enum.