Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a class named date and a program to use it to show all the operation of th

ID: 3660791 • Letter: W

Question

Write a class named date and a program to use it to show all the operation of the member functions. Date will have the following; 1. Date will have 3 integer data members. Month, Day, and Year. 2. Three constructors. Constructor #1 has no arguments and will default to 1/1/70. Constuctor #2 will have 2 arguments and will set the date to arg #1/1/arg #2 (month and year). Constructor #3 will have three arguments and will set the date to arg #1, arg #2, arg #3 (month, day & year). 3. A destructor. 4. SetDay, SetMonth, and SetYear functions. 5. GetDay, GetMonth and GetYear functions. 6. A print member function called print that shows the date stored in a given instance. 7. A == operator overload. 8. A copy constructor. 9. A = operator overload.

Explanation / Answer

include using namespace std; class date { int month; int day; int year; public: date (int month = 1, int day = 1, int year = 2001) { date::month = month; date::day = day; date::year = year; }; void showDate(); ~date(){} }; void date::showDate(){ cout
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote