You notice that when we are looking for inverse compliment pairs we have some code dummied out to handle minor errors in a long string comparison. This should be pulled out into a class called DNAComparator and then another class added for inverse compliments i.e.
class DNAComparator {
// constants to determine the amount of error allowed in "equal" strings
public static boolean areDNAStringsEqual(String a, String b) {
// returns if they are equal allowing for some minor errors
}
// other helper methods for DNAStringsEqual
}
class DNAInverseComparator {
// method to see if two strings are inverse
public static boolean isInverse(String a, String b) {
// find inverse compliment of a
// use DNAComparator to see if inverse compliment of a equals b
}
}
https://github.com/fredkneeland/DNA_Analysis/blob/master/src/InverseCompliment.java#L26
You notice that when we are looking for inverse compliment pairs we have some code dummied out to handle minor errors in a long string comparison. This should be pulled out into a class called DNAComparator and then another class added for inverse compliments i.e.