Search:

Type: Posts; User: D3158

Search: Search took 0.22 seconds.

  1. Replies
    1
    Views
    1,359

    Balanced Binary Search Tree

    I had to make a Balanced Binary Search Tree and I think I have it right but would like your opinion whether I am right or not, please.

    Here is the code that I wrote for it:



    package util;...
  2. Thread: QuickSort method

    by D3158
    Replies
    2
    Views
    393

    QuickSort method

    void quicksort (int[] a, int lo, int hi)
    {
    // lo is the lower index, hi is the upper index
    // of the region of array a that is to be sorted
    int i=lo, j=hi, h;

    // comparison element x...
  3. Thread: 3 Arrays

    by D3158
    Replies
    27
    Views
    1,452

    Re: 3 Arrays

    lab3tester.jpg

    587



    As showed above, Default constructor and default constructor with given size gives OK. But when I run the iterator, nothing is shown for the output.
  4. Thread: 3 Arrays

    by D3158
    Replies
    27
    Views
    1,452

    Re: 3 Arrays

    I am trying to get the iterator to work.


    Here is the code for it.



    @Override
    public Iterator<String> iterator() {
    //throw new UnsupportedOperationException("Not supported...
  5. Thread: 3 Arrays

    by D3158
    Replies
    27
    Views
    1,452

    Re: 3 Arrays

    The bottom line are 2 things:
    1) The program should run with no compilation errors - Check. It runs.
    2) When the program runs, to run the each individual test in the GUI interface (see attached...
  6. Thread: 3 Arrays

    by D3158
    Replies
    27
    Views
    1,452

    Re: 3 Arrays

    I am sorry I was not being co-operative. I was just frustrated and I want to apologize to Norm specially.

    Here is my updated source code that compiles (if people still can help me). It runs.
    ...
  7. Replies
    5
    Views
    428

    Re: insertItem method

    It compiles with errors. It does not misbehave. It runs a Test GUI consisting of:

    Default Constructor OK
    Constructor with given max size OK
    iterator()
    insertItem(Comparable item)...
  8. Thread: 3 Arrays

    by D3158
    Replies
    27
    Views
    1,452

    Re: 3 Arrays

    We are officially done talking. I do not need any assistance from you - ever.
  9. Replies
    5
    Views
    428

    insertItem method

    I am having issues with the following code:

    @Override
    public void insertItem(Comparable item, int position) {
    //throw new UnsupportedOperationException("Not supported yet.");
    ...
  10. Thread: 3 Arrays

    by D3158
    Replies
    27
    Views
    1,452

    Re: 3 Arrays

    When I run the program I get the compilation error (as follows).

    run:
    Exception in thread "AWT-EventQueue-0" util.SimpleListException: Full list
    at...
  11. Thread: 3 Arrays

    by D3158
    Replies
    27
    Views
    1,452

    Re: 3 Arrays

    Okay. With all respect, instead of completely nitpicking, can you provide assistance? You recommended I should draw a diagram - with a pencil and paper - i did that. You wanted me to provide some...
  12. Thread: 3 Arrays

    by D3158
    Replies
    27
    Views
    1,452

    Re: 3 Arrays

    package util; is the only import statement I have.

    There is a separate class provided to me, so when I run it, it runs the test program and I can check what works/does not work. Example: default...
  13. Thread: 3 Arrays

    by D3158
    Replies
    27
    Views
    1,452

    Re: 3 Arrays

    @ Norm. Yes. I couldn't find my original thread. Anyways, I gave it a shot with the arrays. I am having issues with insert item and remove item.

    Here is my code:




    public final class...
  14. Thread: 3 Arrays

    by D3158
    Replies
    27
    Views
    1,452

    3 Arrays

    I am struggling with converting C language to Java language. Can someone please help me with the syntax?

    I need to implement 3 arrays. An array of type Comparable must be used to store the data. ...
  15. Thread: 3 Arrays

    by D3158
    Replies
    27
    Views
    1,452

    Re: 3 Arrays

    public static void main(String [ ] args){
    int dataArray[] = {2, 1, 4, 3};
    int linksArray[] = {4, 0, -1, 2};
    int freeListsArray[] = {5, -1};

    ...
  16. Thread: 3 Arrays

    by D3158
    Replies
    27
    Views
    1,452

    3 Arrays

    I need to implement 3 arrays as per description (look below)

    Linked list must be implemented as three arrays. An array of type Comparable must be used to store the data. Two arrays of integers...
Results 1 to 16 of 16