Create a testing java program

Assignment Help JAVA Programming
Reference no: EM13766727

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.

Verified Expert

The solution file is implemented in netbeans and Random Seq class has two methods are String RandomSeq.getRandomSeq(long arg0) which 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. 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(). We created test 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. The screen shot of this program is attached with solution.

Reference no: EM13766727

Questions Cloud

Analytics-management science or model challenge in the real : The last section of the report should discuss the future opportunities and challenges of solving the problem. What will help solutions improve? What limitations remain?
Do the legal principles apply to vehicles : Do the legal principles apply to vehicles such as bicycles, rowboat, motor homes, trains or airplanes
Compare similarities between maisel jay and sherman cindy : Compare and Contrast, noting the similarities and differences, between 3 photographer Maisel, Jay, Sherman, Cindy and Uelsmann, Jerry.
How a juvenile corrections officer can be verbal : Write a 1,750- word paper describing how a Juvenile corrections officer can be verbal and nonverbal communication can affect communication in the following areas: Public announcement to the press
Create a testing java program : 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.
Future applications of biotechnology : Evaluate current or future applications of biotechnology in the fields of medicine or agriculture.
Identify what the cause of the communication error : Identify what the cause of the communication error may have been. What could be a possible solution to the problem?
Thoroughness-professionalism-substance and persuasiveness : Your answer to this question will be evaluated based on the thoroughness, professionalism, substance, and persuasiveness of your argument.
Do you agree or disagree with the authors conclusion : Locate and review a professional, peer reviewed journal article(s) or case study(s) (minimum article length 7 pages) relating to a business law topic. Do you agree or disagree with the author's conclusion and why or why not

Reviews

inf766727

8/22/2019 2:50:56 AM

Nice work delivered to me I have asked the work to be delivered to me quickly. Programming is clearly done and I am happy that I have explained it in the class. I got full grads in the assignment. Thanks to the team.

inf766727

8/22/2019 2:46:15 AM

I need the programming to be 100% correct because the professor will check it in the class and asked us to present it in the class. Put all the code in sequence and provide me correct code file.

Write a Review

JAVA Programming Questions & Answers

  Create a program named schoolsdemo

Create a program named SchoolsDemo that allows a user to enter data about five school objects and then displays the school objects in order of enrollment size from smalles to largest.

  Implement a recursive method that returns xn

implement a recursive method that returns xn - Suppose we want methods that compute the value of a double precision number raised to an integer power.

  What are the benefits of documenting

What are the benefits of documenting our programs in Java?

  Punished for minor infractions given their mental illness

What if you a Disciplinary Hearing Officer in a unit with mentally ill inmates? How would you sanction offenders for infractions without punishing them for their illnesses? Do you think they should be punished for minor infractions given their mental..

  Write java classes for the class diagram

Write Java classes for the class diagram. You don't need to write any set and get methods for simplicity.

  Prompt the user for a series of numbers

Prompt the user for a series of numbers that may be either a binary number or a decimal number.

  Problem related to eclips

Goals: 1) Be able to work with individual bits in java. 2) Understand the serializable interface. 3) Understand the comparable interface.

  Write a java application program called largest.java

Write a Java application program called Largest.java that inputs a series of 10 single-digit numbers and determines and prints the largest of the numbers

  Write the buttonhandler inner class

The output string should say something like this: "The RC time constant for resistance 1000 and capacitance .000001 is 0.001 seconds." Clicking one of the buttons generates the event which causes the program to do the selected calculation and upda..

  Write a class harvardlawyer to accompany

Write a class HarvardLawyer to accompany the other law firm classes described in this chapter (Ch 9 of Building java programs; a back to basic approach).

  Create a java program to calculate the circumference

Create a Java program based on the geometric shapes. The program should begin by prompting you for the shape you want to calculate the circumference.

  Concept of java socket programming

Designed to asses learning outcomes and write programs that would communicate with another program running in the network

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd