Search:

Type: Posts; User: DavidFongs

Search: Search took 0.07 seconds.

  1. Replies
    28
    Views
    2,970

    Re: Is this allowed?

    1. You are asking quite a bit for people to read all that code

    2. I helped you earlier and now it appears you ignored all of my advice
  2. Replies
    28
    Views
    2,970

    Re: Is this allowed?

    Are you ignoring the advice I'm giving you? Implement the evaluate method for each subclass. One of the evaluate methods simply returns its float value (the leaf). If its not a leaf, you...
  3. Replies
    28
    Views
    2,970

    Re: Is this allowed?

    Did you look up binary tree traversal on google? There are recursive, and non recursive, algorithms with pseudo code
  4. Replies
    28
    Views
    2,970

    Re: Is this allowed?

    The non leaf nodes evaluate will use recursion.



    It is very similar to a binary tree traversal, you can look up the recursive algorithm to do this.
  5. Replies
    28
    Views
    2,970

    Re: Is this allowed?

    You don't need a getData method in the Node class. Looking at the assignment, I don't see why it is necessary.
  6. Replies
    28
    Views
    2,970

    Re: Is this allowed?

    I think its obvious why not. The subclasses take care of holding the data. The abstract super class doesn't hold the data. The type of data is dependent on the subclass. Each subclass has access...
  7. Replies
    28
    Views
    2,970

    Re: Is this allowed?

    Can you explain why you are using generics?

    It seems like you should have an abstract superclass Node, that has an abstract method, evaluate. Then you should have an OperatorNode that extends...
Results 1 to 7 of 7