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

  Modify the numbers guessing game program

Modify the numbers guessing game program. Suppose that the variable num and guess are as declared and the diff is an int variable.

  Program that counts the number of occurrences of lowercase

Write a program that counts the number of occurrences of lowercase and uppercase vowels in entered lines of text. Use a two-dimensional array to store the vowel counts. The array's first column holds the counts for the lowercase vowels, and the secon..

  Latin squares - puzzle

Solve button causes the program to display a single solution by using only the symbols from the top row of six text fields in such a way that the non-empty grid symbols are not altered.

  Java program to find solution of cryptarithmetic puzzle

A solution to puzzle is S=9, R=8, O=0, M=1, Y=2, E=5, N=6, D=7. Write down a java program which finds solution to cryptarithmetic puzzle of: TOO + TOO + TOO + TOO = GOOD.

  Write an expression that concatenates the string variable

Write an expression that concatenates the string variable suffix onto the end of the string variable prefix.

  Create a messageframe class extending jframe

Create a MessageFrame class extending JFrame and a MessagePanel class extending JPanel.

  Reads contents of two vectors

Write a program that reads contents of two vectors, and then displays the sum of these two vectors. The program should prompt the user to enter the size of the vectors first.

  Use a gui interface to control and display result of program

The scenario is inspired by a Library Management System (LIMS). For the first version of the project, the LIMS is a very basic one, allowing just for the import of data from a text file and perfom some basic search operations.

  Write down a java program which prints out division by zero

write a java program that prints out division by zero and array out of bounds exceptions when a user attempts to find

  Methods are commonly used to break a problem down into

methods are commonly used to break a problem down into small manageable pieces. a large task can be broken down into

  Java swing components and file processing

Java Swing Components and File Processing, Write a program named GuessGame.java that plays the game "guess the number" as follows. Your program chooses the number to be guessed by selecting an integer at random in the range 1-1000. The program then..

  Write a program that will calculate monthly pay

Write a program that will calculate monthly pay and expenses for a commercial utility sales person. Sales employees in this company are paid monthly. Each employee is paid a base pay of $1,000 and 9½ % commission on sales. The company deducts 18% of..

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