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
Type: Posts; User: DavidFongs
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
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...
Did you look up binary tree traversal on google? There are recursive, and non recursive, algorithms with pseudo code
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.
You don't need a getData method in the Node class. Looking at the assignment, I don't see why it is necessary.
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...
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...