Problem Solving with C++ (10th Edition)
Problem Solving with C++ (10th Edition)
10th Edition
ISBN: 9780134448282
Author: Walter Savitch, Kenrick Mock
Publisher: PEARSON
Question
Book Icon
Chapter 13, Problem 10PP
Program Plan Intro

Creation of program to display result of computation of Reverse polish Notation

Program Plan:

  • Define a file “Stack.h” to declare operation and methods in stack.
    • Define a structure “StckNde” that contains data and link to next node as members.
    • Define a class “Stack” to define methods and prototypes.
      • Define function prototypes for methods in program.
  • Define a file “Stack.cpp” to define operations and methods in stack.
    • Define a constructor “Stack()” to create an empty stack.
    • Define a destructor “~Stack()” to destroy a stack.
    • Define a method “empty()” to check whether stack is empty.
    • Define a method “pop()” to remove top element of stack.
    • Define a method “datatyeCon()” to display error if stack is empty.
    • Define a method “operator=()” to define operation for “=” operator.
    • Define a method “operator==()” to define operation for “==” operator.
  • Define a file “Main.cpp” to call methods in stack and perform all computations.
    • Declare variables required for the program.
    • Get expression from user.
    • Check for operators and operands.
    • Define a switch case to perform different computations in expression.
    • Display result of operation.

Blurred answer
Students have asked these similar questions
Of the five primary components of an information system (hardware, software, data, people, process), which do you think is the most important to the success of a business organization? Part A - Define each primary component of the information system. Part B - Include your perspective on why your selection is most important. Part C - Provide an example from your personal experience to support your answer.
Management Information Systems
Q2/find the transfer function C/R for the system shown in the figure Re ད
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning