Question
C++ please DNA sequences are a series of four letters: A, C, G, and T. When our body is reading these sequences, it reads them
C++ please
DNA sequences are a series of four letters: A, C, G, and T. When our body is reading these sequences, it reads them in sets of three, which are referred to as codons. Each codon tells your body to do one of three things:
Start reading,
Add a molecule to the sequence,
Stop reading.
The START codon is ATG, and the STOP codons are either TAA, TAG, or TGA; any of those three will stop it. Every other combination of A/C/G/T will add a different molecule to the sequence.
function dnaRead which takes a vector of strings, each of length 3, as the parameter and returns the DNA sequence between the start and stop codons, with the following qualities:
Function Specifications:
The function name: dnaRead
The function parameters in this order:
vector
The function returns a string:
If any vector element is not length 3 or contains a character that is none of A, C, G, or T, return "Invalid sequence." All letters should be capitals.
It returns the combined DNA sequence between the start and stop codons, EXCLUSIVELY.
If there is no start codon, it returns the empty string, "".
If there is no stop codon, it returns a string containing every codon in the vector that occurs after the start codon.
Sample run 1:
vector
Output:
TCA
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started