•	Looking back, we could have used a different ADT definition for BXTree, which has only Build and Evaluate. That is parsing is done outside the class.
•	We will leave the BXTree as it is to avoid confusion
•	Sample output
•	calc
•	+ * + - / 1 2 4 * 3 2 + 4 5 + 6 / + 3 3 3 =
•	30.5
•	Main program
•	b.Parse()
•	b.Build()
•	b.Evaluate()
•	Parse
•	read first tok
•	while tok != “=“
•	add tok to the queue
•	read next tok
•	Build
•	if queue is not empty
•	allocate space for the root
•	Build(root)
•	if queue is not empty : error message
•	Build(t)
•	delete tok from queue
•	t->data = tok
•	if tok is operator
•	allocate space for t->LeftChild
•	Build(t->LeftChild);
•	allocate space for t->RightChild
•	Build(t->RightChild);
•	Evaluate()
•	return Evaluate(root)
•	Evaluate(t)
•	if t is null return 0;
•	if t->data.IsOperator()
•	L = Evaluate(t->LeftChild)
•	R = Evaluate(t->RightChild)
•	switch(t->data.a[0])
•	case ‘+’: return L+R
•	etc.
•	else return t->data.Value()
•	Number of files
•	token.h
•	token.cpp
•	bxtree.h
•	bxtree.cpp
•	binary.h
•	double.h
•	dqueue.h
•	btnode2.h
•	dnode.h
•	xcept.h
•	calc.cpp
•	#include “bxtree.h”
•	void main(void)
•	{
•	}
•	We compile calc.cpp, bxtree.cpp, token.cpp separately, and link them together
•	We will look at infix expressions and postfix expressions
•	Given a postfix expression, evalauate it using stack: postfix calculator
•	Given an infix expression, use a stack to create a postfix expression; evaluate the postfix expression.