Question: Below is my code for an upcoming assignment. I need help constructing a UML diagram off of the information below.: Node.java OperatorNode.java OperandNode.java ExpressionTree.java MyGUI.java

Below is my code for an upcoming assignment. I need help constructing a UML diagram off of the information below.:

Node.java

Below is my code for an upcoming assignment. I need help constructing

OperatorNode.java

a UML diagram off of the information below.: Node.java OperatorNode.java OperandNode.java ExpressionTree.java

OperandNode.java

MyGUI.java // define the class Node public class Node //declare the variables

ExpressionTree.java

protected String data; protected Node leftNode; protected Node rightNode; //getter and setter

MyGUI.java

methods of the instance variables public String getData() return data; public void

// define the class Node public class Node //declare the variables protected String data; protected Node leftNode; protected Node rightNode; //getter and setter methods of the instance variables public String getData() return data; public void setData (String data) this.data = data; public Node getLeftNode () return leftNode; public void setLeftNode (Node leftNode) this.leftNode = leftNode; public Node getRightNode () return rightNode; public void setRightNode (Node rightNode) this.rightNode = rightNode; public String toString() return "(" + this.leftNode + " " + data + " " + this.rightNode + " )"; //define the class OperatorNode which extends Node public class OperatorNode extends Node // constructor // sets the variables public OperatorNode (String operator) this.data = operator; this.leftNode = null; this.rightNode = null; //definition of the method toString() @Override public String toString() return "(" + this.leftNode + " " + data + " " + this.rightNode + ")"; //define the class OperandNode which extends Node public class OperandNode extends Node //constructor // sets the variables public OperandNode (String operand) this.data = operand; this.leftNode = null; this.rightNode = null; //definition of the method toString() @Override public String toString() return data + ""; import java.io. Printwriter; import java.util.Stack; import java.util.StringTokenizer; import javax.swing.JOption Pane; public class ExpressionTree //create a Stack of type Type private Stack stack = new Stack(); //create a Node variable private Node added; //definition of the method checkForOperator() public static boolean checkForOperator (String str) // check if the str is "+" , "-", "*" ,"/" if( str.equals("+") || str.equals("-") 11 str.equals("*") || str.equals("/")) return true; return false; // definition of the method checkForInteger() // check for integer and returns boolean value public static boolean check ForInteger (String str) try Integer.parseInt(str); return true; } catch (Number FormatException nfe) return false; // definition of the method postfixExpressionDilimeter() // it takes postfixExpression and returns the array of string public String[] postfixExpressionDilimeter (String postfixExpression) String expression; expression = postfixExpression; // split the expression and assign into array String[] arry = expression.split("\\s+"); String splitExpression = ""; //declare the header files import java.awt.BorderLayout; import java.awt. Dimension; import java.awt.event. ActionEvent; import java.awt.event.ActionListener; import java.io.IOException; import javax.swing. JButton; import javax.swing.JFrame; import javax.swing. JLabel; import javax.swing.JPanel; import javax.swing.JTextField; //Define the class MyGUI public class MyGUI extends JFrame implements ActionListener //create an object for the class ExpressionTree () ExpressionTree tree = new ExpressionTree(); //definition of the method main() public static void main(String[] args) throws IOException // call the constructor of the MyGUI class new MyGUI(); // constructor public MyGUI () throws IOException //create a Label JLabel promptLabel = new JLabel("Enter Postfix Expression"); //create a Panel JPanel upper Panel = new JPanel(); // create a TextField final JTextField postfixTextField = new JTextField(); //set the dimensions of the postfixTextField postfixTextField.setPreferredSize (new Dimension (250, 25)); // add the promptLabel in the upper Panel upper Panel.add (promptLabel, BorderLayout. EAST) ; // add the postfixTextField in the upper Panel upper Panel.add (postfixTextField, BorderLayout. EAST); // create a JLabel infixLabel JLabel infixLabel = new JLabel("Infix Expression"); // create Panel bottomPanel JPanel bottomPanel = new JPanel(); // create a TextField final JTextField resultTextField = new JTextField()

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!