Please create a testing java program to use this randomseq


One of the key features of Java OOP is to use external class files without knowing much of the implementations. The attached RandomSeq.class file contains the implementation of a RandomSeq class which contain two methods:

String RandomSeq.getRandomSeq(long arg0) -will return a String of randomly generated DNA sequence of any length passed in as a parameter, and void RandomSeq.formatSeq(int arg0) - will print out a formatted DNA sequence with specified length for each line as shown below

1 GACTTGCCAGTTTAATAATGTCACATAATCAGATACGTAGATTCGCTTAT

51 ATGCCCGGCCCACTGACGGAGGGGCCCGGGGGTCCAGCCCATGGGGCAGA

101 GGGACACTCTGAACGCTCGCGCAGGTACGTGTGGTAAACCGATATCGCGC

151 TTCTACTGACTCTCCCACTCAACGAAGACAAGACTTTGGCCACTCACCCG

201 GCATTACTATAGCTCGGTGCAGGGAGTCCTCAGCCCCGCGATGGATATTA

251 GGCTGGCCCCTAACCTGCGAGGACATTCAAAGTAGGTTTTGACCGGCATT

301 GCAAGGTCACTGAGGAGAATTTATGATAGCCGCCCATACC

The RandomSeq class also has two properties (id and seq) which has the set/get methods of setSeqID(String arg0), setSeq(String arg0), and getSeqID(), getSeq().

Please note, when a DNA sequence String was generated using the getRandomSeq() method, the sequence need to be assigned to the object using the setSeq(String arg0) method. After that, the formatSeq() method can be used to print out the formatted sequence.

Please create a testing Java program to use this RandomSeq class to create a random DNA sequence and then print it out in a formatted fashion with a specified length for each line.

Note: if you use NotePad to create your project, you can simply copy the RandomSeq.class attached file into the same folder of your testing Java program. If you use Eclipse or NetBeans, you probably need to create an external class folder for your project and then import the RandomSeq.class file into the class folder.

Here is how to add the RandomSeq.class file to your project in NetBeans and Eclipse: (assume the RandomSeq.class file is saved into C:\BIFS618)

NetBeans: Create the project first, and then right click on the Libraries from the Projects window, and select Add JAR/Folder to open the window. Browse to the folder contains the .class file (c:\BIFS618), click open. Now the folder is added to the Libraries, and you can create a RandomSeq object directly in your project.

Eclipse: Create the project first, and then right click on the project to select properties. In the properties window, select Libraries tab, and click on Add External Class Folder to select the folder contains the RandomSeq class file and click OK. Now you can use the RandomSeq class directly in your project.

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Please create a testing java program to use this randomseq
Reference No:- TGS01036804

Now Priced at $20 (50% Discount)

The task of the assignment is to develop the JAVA program named RandomSeq.java.The RandomSeq class also has two properties (id and seq) which has the set/get methods of setSeqID(String arg0), setSeq(String arg0), and getSeqID(), getSeq().The Java program is tested using this RandomSeq class to create a random DNA sequence and then print it out in a formatted fashion with a specified length for each line.The application is developed using the Eclispe project.

Recommended (92%)

Rated (4.4/5)