The file mathematicians.data contains the names and dates of birth of an indefinite number of mathematicians born in the nineteenth century. Here's a typical line:
1815/11/02 Boole, George
The birth date appears first on each line, in the format year/month/day; both the month and the day are always given as two-digit numbers, as in the example above. The birth date is always followed by exactly six spaces. The mathematician's name is then given, last name first, with the surname followed by a comma, a space, and the forename(s).
Design and write a Scheme program that reads in data from this file and creates two output files, mathematicians-by-date-of-birth.data and mathematicians-by-surname.data, in the current working directory. The mathematicians-by-date-of-birth.data file should contain the same data as the source file, in the same format, but with the lines arranged chronologically by date, from 1802/08/05 at the beginning to 1894/11/26 at the end. The other file, mathematicians-by-surname.data, should contain a list of all the mathematicians named in the source file, arranged alphabetically by surname, in the following format:
George BOOLE (November 2, 1815)
In other words, in this file, the forename(s) should be placed before the surname, the surname should be capitalized, and the date of birth should be written in the more human-readable format month-name day, year, enclosed in parentheses, and placed after the mathematician's name.
This exercise will be due on Thursday, May 1.
This document is available on the World Wide Web as
http://www.math.grin.edu/courses/Scheme/exercise-5.html