Question: Create a C++ Date class that stores a calendar date. There should be a default constructor (taing no arguments) that initializes the Date object to
Create a C++ Date class that stores a calendar date.
There should be a default constructor (taing no arguments) that initializes the Date object to Jan 1, 2000.
A constructor taking three arguments (month, day, year) that initialeze the Date object to the parameter values:
It sets Dates year to 1900 if the year paameter is less than 1900
It sets the Dates month to 1 if the month is outside the range of i to 12
It sets the Dates day to 1 if the day parameter is outside the range of 1 to 12
How do i code this constructor?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
