Question: Please use c++ language class called Date that has the following private member variables a) Design and inplenent a C .month (Int) day (int) .year

Please use c++ language  Please use c++ language class called Date that has the following

class called Date that has the following private member variables a) Design and inplenent a C .month (Int) day (int) .year (int) Add the following public member functions to the class. Default Constructor with all default paraneters: The constructors should use the values of the month, day, and year arguments passed by the client progran to set the ronth, day, and year member variables. The constructor should check if the values of the parameters are vallid (that is day is between 1-31, month is between 1-12 and year is >e). If not, the constructor shoul d use default values 1, 1, 2908 for month, day , and year respectively. Accessors (getters): write one for each member variable month, day, and year. Mutators (setters): write one for each menber variable month, day, and year. The mutators should check if the values passed are valid (that is day is between 1-31, month is between 1-12 and year is ) and if not, do not print1: this function should print the date in "month/day/year" format to the screen, where each month, day and year te in "nonth/day/year" forsat to the screen, where each month, day and year are int's. For example, "1/2/2012" print2: this function should print the date in "month day, year" fornat to the screen where day and January 2, 2012 b) Demonstrate the use of Date class by writing code in your nain function. Make sure to create at least two different and print2 functions, etc. Date objects and call both print

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 Databases Questions!