Implement a class datetypethat manages a


Design and Implement a class dateTypethat manages a calendar. The class dateType should store day, month, year and display it in the following format (01-May-1998). For any object of dateType, your program should be able to perform the following operations on that object.

1. Set the date

2. Get the date

3. Display the date

4. Increment the day by 1

5. Increment the month by 1

6. Increment the year by 1

7. Create another object of dateType and compare it with the object you created earlier; determine whether they are equal or not.

8. Increment the day, month or year by certain number, suppose the date is 29-4-1976 and we add 4 days to it, now the date should be 3-5-1976.

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Implement a class datetypethat manages a
Reference No:- TGS01129489

Now Priced at $8 (50% Discount)

Recommended (97%)

Rated (4.9/5)