Assignment #3 - 91B

Assignment #3 - 91B


Assignment 3                                           T.A. Alan Ezust
============                                           Room 333 McCon
                                                       Weight 35
                                                       Oct 12
!!! UPDATED 5th OCTOBER with NEW DATA !!!!!!!!!!!!!!

Dating Service Program!!
------------------------
                                                        E-Mail to HDNY

 Computer-dating services maintain databases which keep information
about their clients. Classically, such a database keeps a record of each
client, and the record has fields which contain information such as name,
gender, interests, hair colour, eye colour, sexual preference, religion,
birth date, and so on. When searching for a match, a program will search
through the database for other records of people who satisfy enough
requirements to provide a "reasonable match".

 This assignment will give you an idea of what is involved in
obtaining such initial data, and searching through it to gather statistics.

 The FORTRAN program you must write should read the following
information:

(1) The current day/month/year

(2) Birth Date day/month/year
(3) Eye Colour  1=brown, 2=blue, 3= hazel, etc.
(4) Interests   1=skiing, 2=cooking, 3=poker, 4=computers, 5=drinking, etc.

The fields (2),(3),(4) should be read in at least 10 times, for 10
different "people". Store the information gathered in arrays for future
calculations.

After the input is completed, output the following information:

o Number of people who are in the "database"
o Number of people in each age of these age groups 16-19, 20-23, 24-30, 31+
o Percentages of people in each age group.
o Number of people with each eye colour, and percentages.
o Number of people who enjoy each hobby, and percentages.

Note that you must calculate the age of each person by comparing his/her
birth date with the current day/month/year. Be sure to check for all
cases.

Also note that for field (4), each record can contain none, one, or many
choices, so you will need to store the information differently from field
(3).

For extra credit, you can add a field for gender, or more choices for
hobbies, or more records in the input file.

Here is the input data. You can get rid of the comments when you are
copying it into your program (there is no need to have your program filter
it out automatically).

The input data is tailored so that it will test your age calculation
routine, so DO NOT change the current date which is in the below data
to the "real" current date.  Extract and use the data below.

!!!!!!!!!!!!  NEW DATA !!!!!!!!!!!!!!!!!!!

/DATA
22 09 92 ; this is the current date
15 01 60 ; this is the birth date of the first client
1        ; eye colour = brown
2 4 0    ; likes cooking and computers
13 02 64 ; this is the birth date of the second client, and so forth.
2
1 3 0
28 09 68
1
1 4 0
25 03 75
3
3 5 0
22 04 68
2
4 5 0
03 10 62
1
4 0
23 10 66
1
0 ; this one has no interests [ how boring!]. Be sure to handle this case.
05 07 73
2
1 2 3 4 5 0
30 08 71
2
2 0
04 09 68
1
2 5 0