Search:

Type: Posts; User: Java Bean

Search: Search took 0.24 seconds.

  1. ODBC driver problem with MS Access and Tomcat

    I am currently studying a computer science course at university and one of the modules is teaching about Web Development using JSPs. This post is NOT concerning a coursework assignment although I...
  2. Replies
    41
    Views
    2,823

    Re: find largest value in BST

    Solved it :)

    Many thanks Norm for you patience and time. I have changed various values in the file to make different animals have the biggest value and it has returned the correct maximum every...
  3. Replies
    41
    Views
    2,823

    Re: find largest value in BST

    The way I am seeing it is that the returned value is used but that it is incorrect because inorderHelper() is obviously not right yet and I still need to solve that.
  4. Replies
    41
    Views
    2,823

    Re: find largest value in BST

    I took out the unnecessary args. I kind of made the situation worse trying to find a way to get it right and more variables crept in that were not needed.

    The only time it could have returned 0...
  5. Replies
    41
    Views
    2,823

    Re: find largest value in BST

    I have edited the code in post #3 to match my latest testing on it. I am a bit rushed so will mention more about this on my return home.

    Basically the max value is wrongly adjusted to a lower...
  6. Replies
    41
    Views
    2,823

    Re: find largest value in BST

    I will pick this up again tomorrow afternoon. I think I might just get it. I almost want to keep at it now, but I need to do other things for now.

    To update, I have added a variable as an...
  7. Replies
    41
    Views
    2,823

    Re: find largest value in BST

    I have been trying to not use global variables which is the only other way I can see ... so far. I know I must be missing something that once I know it I will know forever, but I just cannot see it...
  8. Replies
    41
    Views
    2,823

    Re: find largest value in BST

    The method returns the root's attribute which is frustrating me. Also, to store it in a variable, the variable needs initialising and therefore it will just default to the initialised value when the...
  9. Replies
    41
    Views
    2,823

    Re: find largest value in BST

    Basically the x and y variables were just done for quickness when trying out my idea and checking what is going on. The names you suggest are essentially what they represent. I have tried to avoid...
  10. Replies
    41
    Views
    2,823

    Re: find largest value in BST

    Thanks for your time with this Norm. For now I have to rest and sleep so I will try again tomorrow.

    I cannot work out the toString() method still. But my main issue here is how to get it to return...
  11. Replies
    41
    Views
    2,823

    Re: find largest value in BST

    I haven't done the toString() method in the Node class, mainly because I haven't worked out what you meant yet (I will probably realise in the morning after I have slept but I doing what I can while...
  12. Replies
    41
    Views
    2,823

    Re: find largest value in BST

    I have made a file which shows the output I am seeing (attached to this post).

    I have also edited the code in post #3 which should be exactly the same as what I am using at the moment
  13. Replies
    41
    Views
    2,823

    Re: find largest value in BST

    It is in post #3

    I have also edited it to have the file I am currently working from in the same thread.

    Maybe I should have edited the code there also.
  14. Replies
    41
    Views
    2,823

    Re: find largest value in BST

    I didn't get my edit in quick enough :eek:

    It compiless now. Sorry.
  15. Replies
    41
    Views
    2,823

    Re: find largest value in BST

    In the BinarySearchTree class I have put these methods which replace the largest() methods previously posted. (I have replaced formatting in my actual code to be submitted work with spaces between...
  16. Replies
    41
    Views
    2,823

    Re: find largest value in BST

    Sorry for the delay in responding. I had other classes today and there is work for them also :(



    I am back to doing this again. I have put in several print statements in to see what is...
  17. Replies
    41
    Views
    2,823

    Re: find largest value in BST

    I am still stuck with this. Whilst I said I can see why my previous effort is failing, I still have not found a way to get this right.

    I am not sure what you mean with the first suggestion. The...
  18. Replies
    41
    Views
    2,823

    Re: find largest value in BST

    I realised it was not checking all the nodes when I looked for an explanation for it returning the wrong value. My first effort to put it right so it searches all nodes caused it to just return the...
  19. Replies
    41
    Views
    2,823

    Re: find largest value in BST

    I found using a print statement very useful in helping me to get to the solution of another method that had been troubling me. I pretty much understand why it is not returning the correct value in...
  20. Replies
    41
    Views
    2,823

    Re: find largest value in BST

    I will create a file that exactly replicates the same issue. After that I will try something that has occurred to me that might work.

    Basically my reason for this is that this is a public forum...
  21. Replies
    41
    Views
    2,823

    Re: find largest value in BST

    It reads the file fine. It is the method that the problem is with. I have made a dummy file and added it to the post. It will probably not have the same result because the data is different, but the...
  22. Replies
    41
    Views
    2,823

    Re: find largest value in BST

    Hello Norm

    Sorry for the delay. I didn't want to put all my code for the whole assignment online so I took out the methods not relevant to this problem and made some slight changes. I have checked...
  23. Replies
    41
    Views
    2,823

    find largest value in BST

    Hi everyone. I have pretty much done all of the coding for my assignment apart from one method.

    The main aim of the assignment is to read in entries from a file and put them into a BST sorted...
Results 1 to 23 of 23