CompE260_Classes_Date

CompE260_Classes_Date - In your client program have a...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Programming Assignment : Classes Write a class called “Date” with month, day and year as the private members. Have a constructor which sets default date to 1 st January 2000. Have accessor functions which retrieves each of the private data members. Also have mutator functions which sets valid values for date as well as each of the private data members. For any invalid entry, set the date to the default value. Finally have a printDate() function which prints date in the following format: mm-dd-yyyy – pad with 0s wherever necessary.
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: In your client program have a function called void IncrementMonth (Date &, int) In your output, print out a result of setting date to valid values, invalid values and increment month to 6 months, 12 months and 15 months. Adjust the day and year accordingly. Print out the starting date before you make any increments. The program is very close to the time class in the text. Print out a hard copy of the source code and the output and turn it in at the BEGINNING of class on 10/5/06 Thursday....
View Full Document

Ask a homework question - tutors are online