Search:

Type: Posts; User: adamniazi

Search: Search took 0.17 seconds.

  1. Link JButton to Array so MouseListener can extract information

    Hi, I am having a hard time trying to figure out how to have my JButtons go through an Array to extract information using MouseListener. I have put a link to my assignment, I'm only having trouble...
  2. Replies
    2
    Views
    1,263

    Re: Mergesort with linkedlist using recursion

    I've updated my code and realized that I would create a LinkedListABS s inside the 2 main if statements in the sort method and had a return statement under it, which I think caused the problem. I...
  3. Replies
    2
    Views
    1,263

    Mergesort with linkedlist using recursion

    Hi, I'm trying to do a mergesort with linklist using recursion. The problem I'm running into is, the code will not enter if(ordered[1].size() > 2) if block to process the second part of the...
  4. Replies
    10
    Views
    1,956

    [SOLVED] Re: Compress DNA sequence using recursion

    Thanks for the help, I got it working and posted the working code above.
  5. Replies
    10
    Views
    1,956

    [SOLVED] Re: Compress DNA sequence using recursion

    test class:


    public class Test{
    public static void main(String[] args){
    String a1 = "";
    String b1 = DNA.compress(a1);
    System.out.println(b1);

    String a3 = "Cat";
  6. Replies
    10
    Views
    1,956

    [SOLVED] Re: Compress DNA sequence using recursion

    these are the tests i'm running, from a different class

    String a1 = "";
    String b1 = DNA.compress(a1);
    System.out.println(b1);

    String a3 = "Cat";
    String b3 =...
  7. Replies
    10
    Views
    1,956

    [SOLVED] Re: Compress DNA sequence using recursion

    So I've got pretty much everything working, except when I start getting double digits. The new code is at the bottom and the part that handles the double digits is bolded. I've code it working well...
  8. Replies
    10
    Views
    1,956

    [SOLVED] Re: Compress DNA sequence using recursion

    I've modified to code to not give ArrayIndexOutOfBoundsException anymore. But it is still not giving me the correct output. Some letters seem to disappear or get added to ones that dont match.

    new...
  9. Replies
    10
    Views
    1,956

    [SOLVED] Compress DNA sequence using recursion

    I am suppose to create a recursive method that will compress a DNA sequence. For example;
    DNA.compress("GGCcCTtttTT") => "G2C3T6"

    but my code keeps giving me an...
Results 1 to 9 of 9