Question: For this class provide: a constructor: parameters for the constructor must be provided in the following order: month, day, and year. use the default values
For this class provide:
a constructor:
parameters for the constructor must be provided in the following order: month, day, and year.
use the default values technique so that if no data is provided for month, day, year the date is set to January
inspectorsgettersaccessors for all the data members. Use the get convention to name your getters.
a mutatorsetter changeDate:
this setter modifies the Date object by adding a given amount of days.
this setter takes one parameter which is an integer that represents the number of days to add to a Date object.
You must be careful and make sure the resulting Date remains in the valid range. For example if you add days to the resulting date should be ; and if you add to the resulting date should be
Note: Remember that January, March, May, July, August, October and December have days. Assume February has always days. April, June, September, and November have days.
Hint: You will need to use loops and if statements for this method. You are not allowed to use the datetime module or any other materials not specifically covered in cS CS
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
