-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAlleleCrossRunner.java
More file actions
23 lines (16 loc) · 885 Bytes
/
AlleleCrossRunner.java
File metadata and controls
23 lines (16 loc) · 885 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
public class AlleleCrossRunner {
public static void main(String[] args) {
Chromosome parent1 = new Chromosome(1);
Chromosome parent2 = new Chromosome(1);
Chromosome child1 = Chromosome.cross(parent1, parent2);
Chromosome parent3 = new Chromosome(2);
Chromosome parent4 = new Chromosome(2);
//dominant/recessive; if you want a specific letter you can also enter that as the string
//parent3.addName(new String[]{"brown/blue eyes", "freckles/no freckles"});
Chromosome child2 = Chromosome.cross(parent3, parent4);
System.out.println("p1: " + parent1.toString() + ", p2: " + parent2.toString());
System.out.println("c1: " + child1.toString());
System.out.println("p3: " + parent3.toString() + ", p4: " + parent4.toString());
System.out.println("c2: " + child2.toString());
}
}