import java.io.File; import java.io.IOException; import java.util.Scanner; import java.util.ArrayList; /** * DNA class. * @author cs416 * @version 1 */ public class DNA { /** * Read DNA Profiles from the specified fileName and returns them as * an ArrayList. * @param fileName The file name containing DNA Profiles * @return DNARecord[] */ public static ArrayList readData(String fileName) throws IOException { throw new UnsupportedOperationException("TO BE IMPLEMENTED"); } /** * Reads the DNA Sequences from the files and counts the RelationType * sequences. * @param fileName The file to count sequences from * @return Profile */ public static Profile readSequence(String fileName) throws IOException { throw new UnsupportedOperationException("TO BE IMPLEMENTED"); } /** * Counts the maximum consecutive matches from the match in the given sequence. * @param sequence The DNA sequence string to search through * @param match The string to match * @return int */ public static int countMaximumConsecutiveMatches(String sequence, String match) { throw new UnsupportedOperationException("TO BE IMPLEMENTED"); } /** * Main function. * @param args The command line arguments. */ public static void main(String[] args) { ArrayList data; try { data = readData(args[0]); Profile profile = readSequence(args[1]); for (DNARecord r : data) { if (r.getProfile().equals(profile)) { System.out.println("Matched " + r.getName() + ": " + r.getProfile()); return; } } System.out.println("No match for " + profile); } catch (IOException e) { System.err.println(e); } } }