Question: In this project, your main object type is going to be class Node. Go ahead and create a file called node.h and declare class Node

In this project, your main object type is going to be classIn this project, your main object type is going to be class Node. Go ahead and create a file called node.h and declare class Node in it. The next step is to implement the functionality for creating the list (Algorithm 1). For this purpose, you need to create two more files - list.h and list.cpp. In list.h declare all the methods needed for building the list and in list.cpp define these methods. Then you should implement class Expression and implement the aforementioned methods, i.e, infixString(), prefixString(), and postfixString(). So, you need to create two more files - expression.h and expression.cpp. Now whats left is to put it all together by writing a main function. To do so, create string.h and string.cpp, declare your main function in string.h and define it in string.cpp. So all in all you will need eight files: node.h, node.cpp, list.h, list.cpp, expression.h, expression.cpp, string.h, and string.cpp.

Functionality of the program Your program should have the following functionalities: 1. A method String infixString): returns an infix string representation of the stored Expression 2. A method String prefixString(): returns a prefix string representation of the stored 3. A method String postfixString): returns a postfix string representation of the stored The prefix representation of an expression shows the operator before the operands, for Expression Expression example the prefix representation of the infix "((x+2)+(x*3)" is "++x2*x 3". The postfix Figure 1: Linked list for a sample expression representation shows the operator after the operands, for example the postfix representation of the infix "(2)(*3) is "r 2+x3 * +. Note that, unlike the infix representation, the prefix and postfix representation do not require parentheses to specify an order of computation. In the output of postfizString) and prefixString), do not use parentheses

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!