class gene { int id; int repeat; gene child; float heading; gene() { child=null; } gene(gene g) { id=g.id; repeat=g.repeat; child=g.child; heading=g.heading; } gene(int i,int r,float h) { id=i; repeat=r; heading=h; child=null; } gene(int i,int r,gene g,float h) { id=i; repeat=r; child=new gene(g); heading=h; } }