Question: Using C++. Complete the implementation of the class date that represents dates written in the form day/month/year. Do not modify the main program. You must

Using C++. Complete the implementation of the class date that represents dates written in the form day/month/year. Do not modify the main program. You must write the prototypes and the definitions of the methods of the class.

?

Using C++. Complete the implementation of the class date that represents dateswritten in the form day/month/year. Do not modify the main program. Youmust write the prototypes and the definitions of the methods of theclass. ? Declaration of Class Date /* File: date. h A class

Declaration of Class Date /* File: date. h A class representing dates in the form: day , month and year dat e s are written to a stream in the form day/month/ year day_number ( ) returns the number of days since 1/1 of the current year including the current day days_between ( ) returns the number of days between two dates not including the first day but including the last day. */ #ifndef DATE H #define DATE_H #include #include using namespace std ; class date { private : int day ; int month ; int year ; public : // you fill in the method prototypes } ; #endif /* DATE H */Implementation of Class Date /* File : date. cpp Implementation of class date */ #include "date.h" #include // number of days in each month const int DAYS [ 12 ] = (31 , 28 , 31 , 30 , 31 , 30 , 31 , 31 , 30 , 31 , 30 , 31 }; 1710101010101010IIIIIIIII Methods of date /1 1 1 1 1 1 1 1 1 1 1 1IIIIIIIIIIIIIIIMain Program Using Class Date /* File : testdate. cpp Application program using class time Programmer : your name Date : */ #include "date.h" int main (void) { ofstream fout ( "date. txt") ; date d(12 , 6 , 2016); date e (14 , 9 , 2018); fout

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 Programming Questions!