3.2.2. Exercises: The Qt Core Module

  1. Write a birthday reminder application called birthdays. Classes to reuse are QDate, QFile, QString, QStringList, and QTextStream.

    • Store name/birthday pairs in any format you like, in a file called birthdays.dat.

    • birthdays with no command line arguments opens the file and lists all birthdays coming up in the next 30 days, in chronological order.

    • birthdays -a “john smith” “yyyy-mm-dd” should add an entry to the file.

    • birthdays -n 40 shows birthdays coming up in the next 40 days.

    • birthdays nameSpec searches for a birthday paired with nameSpec.

[ fromfile: qtcore.xml id: x-qtlibrary ]