Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007
Milestone 2 VBM
Coming from M1 (which required us to create a Person object), M2 required several things...
- Vital information had to be scanned. If something was missing, a message was returned to the user informing him/her of the missing information and some URL's were given that suggested where the info might be found.
- Relationships had to be mirrored and translated so that if x hasMother: y, then y hasChild: x, etc.
- Conflicts and contridictions had to be identified to make sure situations like having a child before you were born couldn't take place.
- Add the ability to perform queries to search for people with limited information known.
Design and Approach
- For the transitive and mirrored info, rather than create a method that would go back and try to fix the relationships after they had already been set up, our design took care of the problem as the relationships were set up. The methods that created relationships automatically mirrored or translated the relationship accordingly. The design was set up to allow redundancy. In other words, if you were to say x hasMother: y, and then you said y hasChild: x, x would not have two mothers and y would not have two of the same child. This came in handy later on in the project and made the design a little more fool-proof.
- Checking for vital information, our design allowed us to use the people list in the Family structure to ensure that each and every person was checked. Each person was checked for pieces of vital information such as a mother or father that might be missing. More complicated checks included those for people who had children and not spouses, etc. After all checks were complete, a screen listing all missing information found was displayed for the user to see with a list of recommended websites they might use to locate the missing information.
- Query class is basically a container class to carry the query information to be used by a Person object. Query class has an instance variable named code to identify which query option is specified by the user. Query criteria from the user are mapped to the instance variable string, object (Person object), or date (a Date object). The query class is then taken-in by a Person object in the method searchFor: (query object). This method first accesses the “code” of the query class to determine which query option to invoke. Then it parses out the information it needs from the query class. To process the query, this method access the list of persons in a family for a relational search, or the list of family and the list of persons in a family to do a global search (both lists are pointed to by an instance variable). Matches are found if the specified field(s) matches the input criteria in the query class.
Link to this Page