Question: 1 Description The development a wrapper class. A wrapper class in brief wraps or encapsulates the functionality of another basic ADT class. It does so




1 Description The development a wrapper class. A wrapper class in brief "wraps" or "encapsulates" the functionality of another basic ADT class. It does so by providing methods that expand the abstraction of the ADT. This programming project will also improve your software development skills, reinforce the concept of ADTs, improve your skills programming reading from standard input, and outputting your results to standard output as well as to a JFrame so it can be executed by a clickable jar purpose of thi s programming project is to explore the use of a binary trees as well as the 2 Objective Develop and test the methods of a wrapper class for the ElementBTPtr class that allows to read any infix mathematical expressions [ e.g. (xt3)*(4-2)/y+ z] and storing it as a tree, then the program should allow to traverse the tree in its three forms prefix, infix and postfix. Note that in this case only the leaves of the three will contain number (or constants) and the rest of the tree elements or nodes will have operators (ie" +,-,*,/,%,^[or power to] ). The wrapper must also include a method to evaluate and provide the result of any complicated infix arithmetic expression. When variables are used a method to set and modify the values of the variables must be part of the program and may be provided by a simple collection array, that stores the name, the type and the value given to the variable (e.g. varNames[10], which uses the following simple ADT public class VarName \ rivate String name, bpe, value; public VarName(String n, String t, String v) { name = n; type = t; talue=u; } public VarName) public String getValue) \ return value; ^ public void setValue(String v) \ value- v; ! public String getType) { return thype; public void setType(String t){ type = t; } public String getName () { return name; } public void setName(String n)\ name-n; \ 1 Description The development a wrapper class. A wrapper class in brief "wraps" or "encapsulates" the functionality of another basic ADT class. It does so by providing methods that expand the abstraction of the ADT. This programming project will also improve your software development skills, reinforce the concept of ADTs, improve your skills programming reading from standard input, and outputting your results to standard output as well as to a JFrame so it can be executed by a clickable jar purpose of thi s programming project is to explore the use of a binary trees as well as the 2 Objective Develop and test the methods of a wrapper class for the ElementBTPtr class that allows to read any infix mathematical expressions [ e.g. (xt3)*(4-2)/y+ z] and storing it as a tree, then the program should allow to traverse the tree in its three forms prefix, infix and postfix. Note that in this case only the leaves of the three will contain number (or constants) and the rest of the tree elements or nodes will have operators (ie" +,-,*,/,%,^[or power to] ). The wrapper must also include a method to evaluate and provide the result of any complicated infix arithmetic expression. When variables are used a method to set and modify the values of the variables must be part of the program and may be provided by a simple collection array, that stores the name, the type and the value given to the variable (e.g. varNames[10], which uses the following simple ADT public class VarName \ rivate String name, bpe, value; public VarName(String n, String t, String v) { name = n; type = t; talue=u; } public VarName) public String getValue) \ return value; ^ public void setValue(String v) \ value- v; ! public String getType) { return thype; public void setType(String t){ type = t; } public String getName () { return name; } public void setName(String n)\ name-n; \
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
