Question: C + + Step 5 : Creating Private Functions: Write three private functions within Date to validate input data: testDay: Validate if the

C++\\Step 5: 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 1 and 12. Return true if valid, false otherwise.
testYear: Verifies that the year is between 1990 and 2030. 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: 230?2022
1/31/2022
6/30/2022
13/01/2022
(5 pts) Insert a screenshot of the results for each test case.
C + + \ \ Step 5 : Creating Private Functions:

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