Question: Can someone help me with this java question? We have the following declarations: You have to add the code for the method trouve() /find() in

Can someone help me with this java question?

We have the following declarations:

Can someone help me with this java question? We have the following

declarations: You have to add the code for the method trouve() /find()

You have to add the code for the method trouve() /find() in other word. This method looks for the ARN to find 3 consecutive Nucleotides. It (the method) looks for the chain of nucleotides AUG or GUG. The method returns the indice (index) of the position of the first nucleotide of the first occurrence in the chain in the ARN. If the chain isnt present in the ARN, so the method returns -1.

For example, the following code:

in other word. This method looks for the ARN to find 3

Shows 1 because the ARN has A is the place 1, U in place 2 and G at place 3. So AUG from place 1.

How can I write the code?

public enum Nucleotide { A, C, G, U, } public class ARN extends ArrayList { public int trouver() { } } public class Principal { public static void main( String [] argv ) { ARN a = new ARN(); a.add( Nucleotide.A ); a.add( Nucleotide. A ); a.add( Nucleotide.U ); a.add( Nucleotide. ); a.add( Nucleotide. A ); a.add( Nucleotide.U ); a.add( Nucleotide.G ); System.out.println( a.trouver() ); } }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!