Answered step by step
Verified Expert Solution
Question
1 Approved Answer
in c++ 265615/aignment/24348904 ignments > date date Date Implement a new struct-based data type Date in a header file date, including operator overloading for input,
in c++
265615/aignment/24348904 ignments > date date Date Implement a new struct-based data type Date in a header file date, including operator overloading for input, output and comparative operators. Write a function et Tomorrow that accepts a Date and returns a Date representing the next day. You will overload the '+'operator to accept a Date Dand an integer N, returning a date that is N days after D. You will also overload the comparative operators > ) to compare two Dates; for this situation, we will say that an earlier Date is less than" a later Date. Use the following definion for your Date struct: struct Dates You can test each of these functions separately by creating a source file ( eg, test.cpp) that creates a Date or two and calls functions to see what happens. Remember to include "date.h" in your source file. Be sure that you place the header file in the same directory as the source, and you should then be able to compile and execute this program, utilizing the type and functions defined in the leader file You can also use this source file with any suitable edits for testing neudete Dutes Previous & ' . O . . pause c/v BNM.P. ?, 1 > Assignments > date date Implement a new struct-based data type - Date - in a header file date., including operator overloading for input, output and comparative operators. Write a function get Tomorrow that accepts a Date and returns a Date representing the next day. You will overload the operator to accept a Date Dand an integer N returning a date that is N days after D. You will also overload the comparative operators >=, == } to compare two Dates; for this situation, we will say that an earlier Date is "less than a later Date. Use the following defintion for your Date struct: struct Date int day tions You can test each of these functions separately by creating a source file (e.g., test.cpp) that creates a Date or two and calls functions to see what happens. Remember to include "date.h" in your source file. Be sure that you place the header file in the same directory as the source, and you should then be able to compile and execute this program, utilizing the type and functions defined in the header file. You can also use this source file with any suitable edits for testing. Binclude 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