Question: find errors and rewrite the whole the whole code amd mention where changes are made: #include class Date { private: int day,month,year; public: / /
find errors and rewrite the whole the whole code amd mention where changes are made:
#include
class Date
private:
int day,month,year;
public:
constructor
Date
day;
month;
year;
std::cout"Constructor called"Date obj
ifdayobj.day && monthobj.month && yearobj.year
return ;
else
return ;
equal to operator
bool operator Date obj
ifdayobj.day && monthobj.month && yearobj.year
return ;
else
return ;
greater then equal to
bool operator Date obj
ifdayobj.day && monthobj.month && yearobj.year
return ;
else
return ;
less then equal to
bool operator Date obj
ifdayobj.day && monthobj.month && yearobj.year
return ;
else
return ;
assigment operator
bool operatorDate obj
ifdayobj.day && monthobj.month && yearobj.year
return ;
increment operator
void operator
day;
month;
year;
Date operator int
Date temp;
day;
month;
year;
return temp;
decrement operator
void operator
day;
month;
year;
Date operator int
Date temp;
day;
month;
year;
return temp;
friend std::ostream& operatorstd::ostream& os const Date& dt
os dtday dtmonth dtyear;
return os;
friend std::iostream& operatorstd::iostream& is const Date& dt
is dtday dtmonth dtyear;
return is;
;
int main
Date d;
Date d;
arthmetic operators
Date sum dd;
std::cout"result of Addition d;
std::cout"you entered"
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
