Spring2004 M1- Create a set of genealogy objects and write a GEDCOM file
note that we have changed the method for setting gender to properly match conventions... sorry for the confusion we caused
Genealogy systems are typically organized around information about individuals (persons) and about biological families. In this first project you will define objects to represent persons and families, provide methods to associate information with persons and families and create a text representation of your objects in a standard genealogical interchange format.
1. You will create an object to represent an individual by sending new to Person. You must implement the following methods to associate information with a person (assume that p := Person new. q := Person new. r := Person new.) :
Naming: p givenName: 'Fred'. p surName: 'Flintstone'.
Gender: p gender:#male. q gender:#female. (Let's not deal with changes in gender in a lifetime.) Gender can be retrieved by calling p gender.
Birth and death dates and locations: p born: (Date newDay: 15 month: 9 year: 1909) location: 'Detroit, Michigan, USA'. and q died: (Date newDay: 29 month: 1 year: 1915) location: 'Unknown'.
Recording miscellaneous information: p note: 'Was an amateur inventor'.
Note that these can occur in any order and that the information about a person may be incomplete.
2. You will create an object to represent a family by sending new to Family or by sending the message Family new husband: p wife: q. to create a family and specify the members of the couple. Information can be associated with a family in the following ways (assume f := Family new.):
Parents: f husband: p. f wife: q.
Children: f addChild: r.
Marriage: f marriageDate: (Date newDay: 27 month: 7 year: 1985) location: 'Atlanta, Georgia, USA'. and also f divorceDate: (Date newDay: 29 month: 9 year: 1989).
Note again that information can be incomplete. For instance, a family can be defined with only one of the parents being specified or even with neither parent specified.
You are to create the ability to export your genealogical data from your tool and demonstrate that your output meets the standard by using it with a freely available GEDCOM-reading tool. GEDCOM's a pretty complicated format, but you only have to use enough of it to encode the kinds of information required above.
Tools for processing GEDCOM files which you can use to demonstrate that you write standard GEDCOM are:
4. Test the classes you implement using SUnit. You should have SUnit classes PersonTest and FamilyTest that test Person and Family. These should be runnable from within TestRunner and contain tests for each method.
Before class time on the due date, turn-in your well-documented code (at least two lines of comments for each non-accessor method, in-line comments at significant portions) using the turnin coweb: http://coweb.cc.gatech.edu/cs2340turnin
20% Good Smalltalk style:
10% Good reuse of existing code
5% Good variable names that start with lowercase letters
5% good comments.
80% Correct implementation:
20% Correctly use SUnit to run unit tests
20% Correctly implement Person class
20% Correctly implement Family class
20% Correctly generate a GEDCOM file representing all Person and Family objects