Convert the class below to
//COMP201 Project 5: Convert the class below to ADT ( addaccessors, mutators, constructors and //equals() function. All data will be private. Rewrite main() driver. Write the equals //function before refactoring to ADT and rewrite after to see the necessary changes.
#include iostream
usingnamespacestd;
classDayOfYear
{public:
void output( );
int month;
int day;
};
int main()
{ DayOfYear today, birthday;
coutEnter todays date:n;
coutEnter month as a number: ;
cintoday.month;
coutEnter the day of the month: ;
cintoday.day;
coutEnter your birthday:n;
coutEnter month as a number: ;
cinbirthday.month;
coutEnter the day of the month: ;
cinbirthday.day;
coutTodays date is ;
today.output( );
coutYour birthday is ;
birthday.output( );
if (today.month == birthday.monthtoday.day == birthday.day)
coutHappy Birthday!n;
else
coutHappy Unbirthday!n;
return 0;
}
//Uses iostream:
voidDayOfYear::output( )
{ coutmonth = month , day = day endl;}
