Question
Java for DNA sequence: The attached RandomSeq.class file contains the implementation of a RandomSeq class which contain two methods: String RandomSeq.getRandomSeq(long arg0) -will return a
Java for DNA sequence:
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
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 file into the same folder of your testing Java program.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started