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
05
Anonymous Grading:no
Exercise 1: 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 user-provided 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 mmddyyyy format.
1: Returns the string "Winter", "Spring", "Summer", or "Fall" based on the season. Use the following dates as a guide:
First day of Spring: March 21
First day of Summer: June 21
First day of Fall: September 23
First day of Winter: December 22
Client program
Once you have created the Date class, create a client program inat displays the date in mm/dd/yyyy format (calls getDate function) and shows the season (calls function) for each of the following dates:
 Offline Score: Add Comment 05 Anonymous Grading:no Exercise 1: ADT Instructions:

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!