View this PageEdit this PageAttachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide
Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007

Milestone 2 Case Study - DY

Milestone 2 Specs

Finding a Group

We formed our group without really thinking about what kind of people we should have. Don't get people who are going to drop. Bad things will happen. Make sure your group will always show up for group meetings. If you schedule a meeting for 11am on a Sunday and everyone shows up, you have a good group. Keep it. Then make sure all meetings are at night.

Getting Started

First, make a design. Everything's a lot easier if you have a design before you start. But we didn't. Our main class, Person, had to be recoded because of our lack of foresight.
Here's what we did - we split up the assignment into four parts and just started coding independently, and went our seperate ways. In two weeks, we came back, and nothing worked. Here's what we should have done - sat down and drawn out what we expected to be happening in each part and get basic functionality going together. Always make sure everyone is on the same page.

Making it Work

We placed all the basic functions on one object class - Person. That class held other classes which actually performed the operations - Family and Marraige - that we necessary for linkages between Persons. That way, when performing Queries and 'check', each class could check all of its information independently and return the results. One of our group members is insane and worked a hack to get Query to work. Don't look at his code. You will go crazy. (Note: If you have a member like this, let him code how he wants. It works. Trust him.)
As we coded, we did whatever was necessary to make it work. Great for this milestone, but forced us to recode later. It got dirty very quickly.

Our Design

PUT DESIGN HERE

Class Descriptions

Description: The person class holds all of the information about a specific person, and whether or not their familial relationships have been set. This class is where all interactions with the user take place, and it determines familial structures. The check method will check that all dates do not imply contradictions in familial relationships. The hasSibling method checks the other siblingís relations to make sure that the relationship is not contradictory (with parents) and will make sure that all implied data is mirrored.
Description: The Family class contains the family structure. When children are had, a family is defined and stores Person objects as a Mother, Father, and child. Children are stored as an OrderedCollection of siblings. This class controls the implementation of the tree structure of multiple generations. The check function of the family class determines whether or not it is possible for the relations to exist - like mothers cannot be younger than the children, and other such conflicts.
Description: The Marriage class holds information about marriages and divorces between two instances of Person. It allows multiple marriages and divorces and keeps track of all of them (past and present). It checks for previous divorces before allowing new marriages (if there was a previous marriage) and checks dates for consistency (no divorces before marriages, etc).
Description: The query class contains methods that look through a specific personís family tree for a given bit of information, and looks through every person in the program for a piece of information contained and where in the data. - This is where crazy coding comes into play. Think code blocks. Think scary.

Afterthoughts

  1. Test before turning it in. The key to doing this is not to wait until the last minute. You don't want to be finishing less than an hour before it's due. Being in the lab all night is bad.
  2. Take advantage of Squeak debugging. The pink error box, though confusing at first, starts to make sense. Find your error in there and it'll be easier to fix. Also, 'explore it' is your friend.
  3. Meet with your group early and often. The more you communicate, the easier things are to fix.

Link to this Page