Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

[ 3-2 ] ( Gene .java ) Write a program that reads a String from the user represe

ID: 3586267 • Letter: #

Question

[3-2] (Gene.java) Write a program that reads a String from the user representing a DNA molecule as a sequence of letters A, C, G, and T, each letter representing a different base. Then determine whether it represents a potential gene, based on the following criteria:

It begins with the start codon ATG.

Its length is a multiple of 3.

It ends with one of the stop codons TAG, TAA, or TGA.

It has no intervening stop codons that anywhere in the sequence between the first three and last three codons.

The starting code for this problem has a main() method that reads the input String using StdIn.readLine(), and also provides a method isValidDNA(String str), which returns true if all characters in str are one of A, C, G, and T. Otherwise return false.

           

Finish this main() implementation. You should validate the input String and print Not valid DNA if it contains any characters other than one of A, C, G, and T. Otherwise check it and print Is potential gene if it satisfies the previous criteria, and Is NOT potential gene otherwise.

Explanation / Answer

//if you need help regarding this program. Please leave comment............. thanks

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote