Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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