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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started