Data Structure Calculator Simulation Project (Stacks)

Description

Hello, I need help with creating a project in C++. I attached one file with the instructions and another one with notes that might be helpful. The final project has five files (as the instruction says). Programming language: C++, using Stacks!

Don't use plagiarized sources. Get Your Custom Assignment on
Data Structure Calculator Simulation Project (Stacks)
From as Little as $13/Page

Unformatted Attachment Preview

Project
Calculator Simulation
Focus on: template stack, stack applications, and converting an infix to
its equivalent postfix and evaluating the postfix expression.
TASK:
You will write a program (using stacks) that acts as a simple calculator,
reading an infix algebraic expression with numbers and simple operations:
+, -, *, /, (, and ). The program converts an infix expression into an
equivalent postfix expression, and then evaluates the postfix expression, and
then prints the result if input expression is correct otherwise prints error
messages. Your program must interact with the user until the user quits.
REQUIREMENTS:
1.
Your simulator must work with both single digit operands and
multiple digit operands.
2.
You may use your own stack template class or library .
3.
You must write a readme file that explains how to compile and run
your project.
4.
You must develop a design document to how your project works.
5.
Your program must produce a correct result if an input expression
is correct, otherwise an error message should be given.
6.
You must comment your program properly (including proper
comments and program synopsis). You may suffer up to 20 %
percent penalty if you failed to do so.
7.
You must put your functions and variables together to form a
class—calculator.
8.
You may have at least three functions: start,
convert_infix_to_postfix, check_match, and evaluate_postfix in
your class.
FINAL FILES (5): copy of your source code, readme file, your
testing data, your program’s output (screenshot), and your program
design.
Your program output may look like:
Enter your infix: (3+4)*7
The result is:
49
Would you do it again (y/n): y
Enter your infix:
The result is:
(312 + 40 ) * 3
1056
Enter your infix: 23+(34-5 *3
Group operator did not match, please input again.
Would you do it again (y/n): n
THANK YOU!
Your main function may look like:
OOP Approach:
int main()
{
Calculator mycal;
mycal.start();
}
Your class may look like:
class Calculator
{
private:
string infix, postfix; //store infix and postfix
char answer; //store answer
public:
Calculator( );
void start( ); //starting calculation until the user quits
bool check_match();//checking group operators’ match
void convert_infix_postfix( );//converting infix to postfix
void evaluate_postfix( );//evaluating postfix
int precedence(char);//determining operator’s priority
};
Your start function may look like:
void Calculator::start( )
{
do {
cout
Purchase answer to see full
attachment