Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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:

image text in transcribed

image text in transcribed

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:

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Server Query Performance Tuning

Authors: Sajal Dam, Grant Fritchey

4th Edition

1430267429, 9781430267423

More Books

Students also viewed these Databases questions

Question

=+2. Is therapy a tool you might consider using? Why or why not?

Answered: 1 week ago