Write a program that prompts the user to enter a person’s date of birth in numeric...

60.1K

Verified Solution

Question

Programming

Write a program that prompts the user to enter a person’s dateof birth in numeric form such as 8-27-1980. The program thenoutputs the date of birth in the form: August 27, 1980. Yourprogram must contain at least two exception classes: invalidDay andinvalidMonth. If the user enters an invalid value for day, then theprogram should throw and catch an invalidDay object. Follow similarconventions for the invalid values of month and year. (Note thatyour program must handle a leap year.)

Also the answer has to be written with 3 header files -main.cpp, invalidDay.h and invalidMonth.h

In the output, if we enter a wrong year or month; then theprogram should not show the output of \"Invalid month\" but it shouldagain ask the user to re-enter the month or the thing that isentered incorrectly.

Answer & Explanation Solved by verified expert
4.3 Ratings (843 Votes)
Hey There I understood your question and I have given my answer thatproduces the exact results mentioned in the question My code will also take care of Leap Year I have provided all3 files along with screenshots that show how my code performs    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students