Writing programs to solve the Programming Projects helps to solidify your understanding of the material and demonstrates how the chapter’s concepts are applied. (As noted in the Introduction, qualified instructors may obtain completed solutions to the Programming Projects on the publisher’s Web site.)
Write a program that transforms a postfix expression into a tree such as that shown in Figure 8.11 in this chapter. You’ll need to modify the Tree class from the tree, java program (Listing 8.1) and the ParsePost class from the postfix, java program (Listing 4.8) in Chapter 4. There are more details in the discussion of Figure 8.11.
After the tree is generated, traversals of the tree will yield the prefix, infix, and postfix equivalents of the algebraic expression. The infix version will need parentheses to avoid generating ambiguous expressions. In the inOrder () method, display an opening parenthesis before the first recursive call and a closing parenthesis after the second recursive call.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.