A DNA sequence is a string that contains only the characters ‘A’, ‘T’, ‘C’, ‘G’ (representing the four bases adenine, A;
Posted: Fri May 20, 2022 12:47 pm
A DNA sequence is a string that contains only the characters
‘A’, ‘T’, ‘C’, ‘G’ (representing the four bases adenine, A;
thymine, T; cytosine, C; guanine, G). You are to implement a C++
class that can count the number of times a specific triplet of
bases (also called a codon, e.g., “ATC”, “GGG”,
“TAG”) appears in a set of DNA sequences.
For example, given two DNA sequences: TCTCCCTGACCC
and CCCTGACCC
Implement your logic in a class Codons. The class should
have 3 public member functions:
‘A’, ‘T’, ‘C’, ‘G’ (representing the four bases adenine, A;
thymine, T; cytosine, C; guanine, G). You are to implement a C++
class that can count the number of times a specific triplet of
bases (also called a codon, e.g., “ATC”, “GGG”,
“TAG”) appears in a set of DNA sequences.
For example, given two DNA sequences: TCTCCCTGACCC
and CCCTGACCC
Implement your logic in a class Codons. The class should
have 3 public member functions: