[Exercise 6]

Use the class "Date"

description | solution | discussion
exercises after lesson "More on Classes"
list of all exercises

Take the program of exercise 4 and replace the uses of struct Date by objects of class Date. In addition, for each person in the list print how old she or he is at the end of the current year (Dec 31).

Solution:

Additionally needed sources:

Discussion of solution (*)