Question: Create a class called myDate with month, date, and year fields Overload the >> operator for the class to read a date in the format

Create a class called myDate with month, date, and year fields

Overload the >> operator for the class to read a date in the format mm/dd/yyyy a. E.g., 09/25/2017 should read 9 in the field month, 25 in the field date and 2017 in the field year

Create a class called Student with fields name and birthday. Name should be of type string and birthday should be of type myDate. Overload >, <, <=, >= to compare two objects of type myDate From a file called birthdays.txt, read a list of student birthdays in the format:

mm/dd/yyyy Alice mm/dd/yyyy Bob

Print the oldest and youngest students name and birthdays Throw an error if the format of the date is wrong

Validate the date based on the calendar, e.g., 02/30/2017 should throw an error because February has only 28 days in 2017.

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