FileDocCategorySizeDatePackage
IndividualDM.javaAPI DocExample732Tue Dec 08 01:21:00 GMT 1998DataManagement

IndividualDM.java


package DataManagement;

import ProblemDomain.*;
import java.util.*;

public class IndividualDM {

  Hashtable records = null;
  public IndividualDM() {
    records = new Hashtable();
  }

  public void add(int refNo,String FamilyName,String GivenNames, String sex, Birth birth, Death death) {
    Individual person = new Individual(refNo,FamilyName,GivenNames,sex,birth,death);
    records.put(new Integer(refNo),person);
  }

  public void setData(Hashtable object) {
    records = object;
  }

  public Enumeration list() {
    return records.keys();
  }

  public Hashtable getRecords() {
    return records;
  }

  public Object getRecord(Object index) {
    return records.get(index);
  }
}