Question: Write a Date class that contains 3 integer data members (month, day, year) along with the appropriate methods (functions). You should have 3 files when

Write a Date class that contains 3 integer data members (month, day, year) along with the appropriate methods (functions).

You should have 3 files when you are done: 1. Date.h 2. Date.cpp 3. mainDriver1.cpp

The methods should allow you to write a main function that does the following:

Declare a date called today, that contains todays date: 2, 11, 2019

Declare a date called tomorrow but dont send it any data values.

Call the setValues() method on tomorrow to set tomorrows date.

Write a C++ print statement to print the following to the screen:

todays day is 11

tomorrows day is 12

Declare a date called yesterday but dont send it any data values.

Call the setDay() method on yesterday to set yesterdays day to 10.

Write a C++ print statement to print the following to the screen:

yesterdays day was 10

Add a C++ print statement to the destructor that simply says inside destructor.

Add a C++ print statement to your constructor(s) that says which constructor is being invoked.

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!