Question: lCreate a lC++ class called upDate. It should have the following operations: upDate[ ) default constructor. This will set the date to May 11, 1959

 lCreate a lC++ class called upDate. It should have the following

lCreate a lC++ class called upDate. It should have the following operations: upDate[ ) default constructor. This will set the date to May 11, 1959 (A very important date\" !} upDate[int M, int D, int Y) overloaded constructor. This will set the date to the values passed in through the parameter list represented by Month, Day and Year. If any one ofthe parameters is out of range, the date is set to the default date. upDate[ int J] overloaded constructor create a date using the Julian date ~upDateI[ ] destructor. Be sure to deallocate any memory that was allocated in the constructor. void setDate{int M, int D, int Y} works just like the constructor int getMonthI[ } return the month in integer form int getDajrf } return the day of the month int getYearf ) return the year string getMonthName( ) return the name ofthe month Add the necessary class methods {functions} to support the following: upDate D1{1 [15212010],- H overloaded constructor upDate D2{D1); H copy constructor upDate D3 2 D2,- H also copy constructor initialize D3 to be copy of D2 D1 2 D2; H assignment operator D1 += 5,- \" add 5 days to D1, result is stored in D1 D1 -= '1"; H subtract 7 days from D1, result is stored in D1 D3 2 D2 + 5,- H add 5 days to D2, assign result to D3 D3 = 5 + D2,- ,Ff add 5 days to D2, assign result to D3 D3 2 D2 '1; H subtract 4 days from D2, assign result to D3 int x = D5 D4,- \" days between D5 and D4. Can be negative or positive cout

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!