Corbin, I will try to help you if you would please show us either your complete program, or the actual error message from the compiler (cut and pasted, not paraphrased!) or both. But based on what you've shown here, I can't tell you why you're getting an error.
Joined: Nov 10, 2004
Okay, i will post the entire code. Give me a minute.
Joined: Nov 10, 2004
I am gogin to email the files to you there are a lot of them.
It would be helpful for you to post the code here. That way all of us can try to help you out, especially if Ernest isn't available at the moment. If you have a lot of code, you are probably making this more complicated than it should be. I would guess a palindrome verifier shouldn't be more than 100 lines of code (give or take).
With that said, you should still be able to post only the lines of code that are giving the compiler error along with the actual text of the error message (copy-and-pasted not paraphrased).
Anyway, I hope we can help you find your problem. As Ernest says, additional information will definitely help us help you.
Enter d to create a random tube, s to save the entered sequences to a file, o for test tube operations, x to exit:
o Enter n to compute NCH DNA sequences, l to test ligase, p to test polymerase, or e to create an edge Sequence, r to find palindromes, and x to exit:
r The palindromes are: //The program resets itself right here...but i want it to list the palindromes in my array. please help! Enter d to create a random tube, s to save the entered sequences to a file, o for test tube operations, x to exit:
here is my isPalindrome method:
My test method which is what i am having problems writing I am wondering how to take the sequences out of the array and parse them into a string.
Joined: Dec 06, 2001
There is something not quite right between the error message and the line of code:
It looks like you are trying to create a new Sequence object and assign it to a Tube reference. Although this isn't at all what the error message is complaining about, it is definitely a problem. I think you need to do something more like:
The variable someSequence needs to be a valid instance of Sequence. I don't even know what Sequence is, so I don't know how you would create someSequence in the above line of code.
This program seems much more complicated than I expected. Are you only checking for palindromes or is there something more to this than that? Would you mind giving a link to the assignment description or at least pasting it here?
Thanks. That should help us understand what you are trying to accomplish with this program.
I noticed a question that is hiding in one of your posts:
Is there a way to pass an array into a String?
However, I'm not exactly sure what you mean. Can you clarify?
You also say
I am wondering how to take the sequences out of the array and parse them into a string.
I probably haven't looked at your code closely enough. However, I do notice that you use the Sequence class a lot. I'm assuming this represents a gene sequence, but beyond that I don't know what Sequence is. Can you explain what you are trying to do here? I suspect this may be related to the first question I quoted...
hey guys, i appologize for this but i read the assignment wrong. It was a lot easier once i have done what i am suppose to, but i am having one problem working with input from a file.
I have a file input, that i have to printout to the console, i did that no problem, but what i want to do now is check the contents of that file for palindromes. That's what the assignment is talking about.
Okay, here is my method for getting the input from the file.
i am trying to figure out how to work with the contents though? Do you use StringTokenizer? Here is what i have.