Using these two new methods in your program to calculate


Add two more methods to the DNA class in question #1, getSize() to return the length of the DNA sequence, and baseCount() to count the number of a particular base nucleotide. The baseCount() method will take in one parameter, a base nucleotide (A, T, G, or C), and return a number count of that nucleotide in the DNA sequence, such as:

count_of_A = dna.baseCount('A');

count_of_C = dna.baseCount('C');

Using these two new methods in your program to calculate the percentage of GC contents in the DNA sequence you entered. Round your answer to 2 decimal places.

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Using these two new methods in your program to calculate
Reference No:- TGS02850711

Now Priced at $10 (50% Discount)

Recommended (99%)

Rated (4.3/5)