Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Overload the Unary -- (pre-decrement) operator. Write a program which has a clas

ID: 3608783 • Letter: O

Question

Overload the Unary -- (pre-decrement) operator.

Write a program which has a class Date, Thisclass should have four data members, day, month, year,firstday (i.e. first day of the month).

The class should further contain two constructors (i.e. Defaultand parameterize), a Display Function which display the date informat ( e.g 10-01-2007) and - - Operatorfunction, which decrement the day memberof the Date class. Keep in mind that if the day isfirst day of the month then it should also decrement themonth data member and if month is the first monthof the year then it should also decrement the yeardata member of the class.

Explanation / Answer

Overload the Unary -- (pre-decrement) operator. Write a program which has a clas