Question: Date.h #include #ifndef DATE_H #define DATE_H class Date{ public: Date (unsigned int = 1, unsigned int = 1, unsigned int = 2000); void setDate(unsigned int
Date.h #include
#ifndef DATE_H #define DATE_H class Date{ public: Date (unsigned int = 1, unsigned int = 1, unsigned int = 2000); void setDate(unsigned int m, unsigned int d, unsigned int y); void setMonth(unsigned int m); void setDay(unsigned int d); void setYear(unsigned int y); unsigned int getMonth() const; unsigned int getDay() const; unsigned int getYear() const; std::string toString() const; std::string fullDisplay() const; private: unsigned int month{0}; unsigned int day{0}; unsigned int year{0}; }; #endif
Date.cpp #include#include #include #include #include "Date.h" Date::Date(unsigned int m, unsigned int d, unsigned int y) { setDate(m, d, y); } void Date::setDate(unsigned int m, unsigned int d, unsigned int y) { setMonth(m); setDay(d); setYear(y); } void Date::setMonth(unsigned int m) { if (m >= 1 && m = 1 && d 3.1a Using the Date class built in class, allow the user to input a date in the format MM/DD/YYYY. Use an input stringstream to parse the individual month, day and year out of the input for the date object. 3.1b Test the input of a date in the format MM/DD/YYYY and create a Date object with that information. Call the Date to_string function to see that the date in the object is the same as the date input. 3.2a Using the Date class built in class, create a member function fullDisplay that will display the date with the full text representation of the month. For example, 01/05/2019 would display as January 5, 2019. 3.2b Test your fullDisplay function with dates in each month and see that the month displays correctly. 3.1a Using the Date class built in class, allow the user to input a date in the format MM/DD/YYYY. Use an input stringstream to parse the individual month, day and year out of the input for the date object. 3.1b Test the input of a date in the format MM/DD/YYYY and create a Date object with that information. Call the Date to_string function to see that the date in the object is the same as the date input. 3.2a Using the Date class built in class, create a member function fullDisplay that will display the date with the full text representation of the month. For example, 01/05/2019 would display as January 5, 2019. 3.2b Test your fullDisplay function with dates in each month and see that the month displays correctly
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock

Date.h #include