Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals, Design, and Implementation

Authors: David M. Kroenke, David J. Auer

14th edition

133876705, 9781292107639, 1292107634, 978-0133876703

More Books

Students also viewed these Databases questions

Question

In full detail, explain the following EPS/EBIT chart.

Answered: 1 week ago