write a c+++ program to find which data is greater than given data(assume the 2 dates in one single year only, consider leap year also as an input). a. define a class called day with members as date, month, and year. b. define a parameterized constructor to initialize the dates. c. overload>operator using member function to check if date1>date2. d. write a show_date function to show the date in dd:mm:yyyy format. output expected: enter date 1: the date=23 month=05 year=2019 *****************************first date************************************* date is 23:5:2019 *****************************second date********************************** date is 2:2:2019 *****************************result************************************* date 23:05:2019 is greater than 02:02::2019
write a c+++ program to find which data is greater than given data(assume the 2 dates in one single year only, consider leap year also as an input).
a. define a class called day with members as date, month, and year.
b. define a parameterized constructor to initialize the dates.
c. overload>operator using member function to check if date1>date2.
d. write a show_date function to show the date in dd:mm:yyyy format.
output expected:
enter date 1:
the date=23
month=05
year=2019
*****************************first date*************************************
date is 23:5:2019
*****************************second date**********************************
date is 2:2:2019
*****************************result*************************************
date 23:05:2019 is greater than 02:02::2019
Step by step
Solved in 2 steps