/** * DNA class represents the DNA strand. * * @author ... (your name goes here) * @version ... (date goes here) */ public class DNA { //DNA sequence of nucleotide basis private String sequence; //valid/invalid indicator private boolean valid; /** * Initializes newly created DNA strand to the provided * sequence. The sequence is validated to contain only * legal nucleotides: guanine (G), adenine (A), * thymine (T), or cytosine (C). * @param sequence the sequence of nucleotide basis to be used * in this DNA */ public DNA ( String sequence ) { } /* * Operates on the sequence of this DNA object. It returns true/false * indicating validity of the sequence. The sequence is valid if it contains * only legal nucleotide basis: guanine (G), adenine (A), * thymine (T), or cytosine (C). The valid data field is set accordingly. * @return true if the sequence in this DNA object is valid, false otherwise */ private boolean validate () { } /** * Translates this DNA object to its corresponding RNA sequence. The DNA and RNA * are closely related. The major difference is that the RNA contains * uracil (U) rather than thymine (T). This method replaces every occurrence of T * in the sequence by U and returns the corresponding String object. * @return the RNA sequence */ public String toRNA () { } /** * Computes the complementary DNA strand. The DNA usually exists as a double * helix: given the strand stored in this DNA object, this method computes * and returns the second strand from the helix. To compute the complementary * strand all A's need to be swapped with T's (and vice versa) and all C's need * to be swapped with G's (and vice versa), and then the rerulting string is * reversed. * @return DNA object containing the reverse complement of the sequence stored * in this DNA object */ public DNA reverseComplement () { } /** * Returns true if this DNA object contains a valid strand and false otherwise. * @return true if this DNA object contains a valid strand and false otherwise */ public boolean isValid () { } /** * Returns the String representation of this DNA object which is the sequence * itself. */ public String toString () { } }