Question: Create a class to implement a Stack providing all appropriate operations in the class, use so that you can use the same class for integer

  1. Create a class to implement a Stack providing all appropriate operations in the class, use so that you can use the same class for integer stack and character stack.

  1. Write a driver program which gives user an option:

  • To write an expression (infix/postfix) in an output file.
  • To read an infix expression from a file and check its validity.
  • To read a valid infix expression from a file and convert it into a postfix expression and write it in an output file.
  • To read a postfix expression from a file and evaluate it and display its value on console.

  1. Create separate functions for each of the task above. Stack class implementation can be dynamic or static.

Step by Step Solution

3.53 Rating (167 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Solution CODE Nodeh typedef int DataType class Node public Node Node DataType data Node next Nodecpp include Nodeh NodeNode NodeNode Stackh include No... View full answer

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 Programming Questions!