Question: Exercise 2. Create a class called Date that includes three pieces of information as data members-a month (type int), a day (type in have a

 Exercise 2. Create a class called Date that includes three pieces

Exercise 2. Create a class called Date that includes three pieces of information as data members-a month (type int), a day (type in have a constructor that initializes the three data members. For the purpose of this exercise, assume that the values provided for the year and day are correct, but ensure that the month value is in the range 1-12; if it is not, set the month to 1. Provide a set and a get function for each data member. Provide a member function displayDate that displays the month, day and year separated by forward slashes (). Write a test program that demonstrates class Date's capabilities ) and a year (type in). Your class should

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!