Question: C + + Step 5 : Creating Private Functions: Write three private functions within Date to validate input data: testDay: Validate if the
CStep : Creating Private Functions:
Write three private functions within Date to validate input data:
testDay: Validate if the day is correct for the given month. Return true if valid, false otherwise.
testMonth: Checks if the month is between and Return true if valid, false otherwise.
testYear: Verifies that the year is between and Return true if valid, false otherwise.
Modify the set function to use these validation functions. set should return false if any validation function returns false.
In main function, test the set function with the following dates to verify its correctness:
pts Insert a screenshot of the results for each test case.
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
