Question: Offline Score: Add Comment 0 5 Anonymous Grading:no Exercise 1 : ADT Instructions: Date Class Write a C + + class definition for an abstract
Offline Score:
Add Comment
Anonymous Grading:no
Exercise : ADT
Instructions:
Date Class
Write a C class definition for an abstract data type called Date that models a day of the year. The Date class stores the year, month, and day. Your class should implement the following member functions:
A default constructor with no userprovided arguments.
A constructor with three integer arguments the month, and day in that order. Use the arguments to initialize the data members.
void setDate int year, int month, int day: Sets the year, month, and day of the invoking Date object.
string getDate : Returns the string version of the date in format.
: Returns the string "Winter", "Spring", "Summer", or "Fall" based on the season. Use the following dates as a guide:
First day of Spring: March
First day of Summer: June
First day of Fall: September
First day of Winter: December
Client program
Once you have created the Date class, create a client program inat displays the date in mmddyyyy format calls getDate function and shows the season calls function for each of the following dates:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
