Question: C + + Write a program that prom th XL 1 0 e user to enter a person s date of birth in numeric

"C++ Write a program that prom th XL10 e user to enter a persons date of birth in numeric form such as 8-27-1980. The program then outputs the date of birth in the form: August 27,1980. Your program must contain at least two exception classes: invalidDay and invalidMonth. If the user enters an invalid value for day, then the program should throw and catch an invalidDay object. Follow similar conventions for the invalid values of month and year. (Note that your program must handle a leap year.)
Test Case 1
1991-3-3
Input
1991
3
3
Output Example
Enter year:
1991
Enter the month:
3
Enter the day:
3
Date of Birth March 3,1991
Expected Results:
March 3,1991
Test Case 2
2000-4-20(with invalid first entry for month)
Input
2000
13
4
20
Expected Results:
April 20,2000"

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!