Design a program with the following specifications:
Required Program Name: RPN
Subject:Computer SciencePrice:6.86 Bought12
Share With
Design a program with the following specifications:
Required Program Name: RPN.java
The program can use either command line arguments or standard input (the CLI) to enter in a file name. For standard input, the program should use standard output to prompt the user for the name of a file. This file contains a set of expressions in RPN format.
If the input file does not exist or an I/O error occurs while processing it, an error message is displayed and execution halts.
The input data file is a plain ASCII text file containing RPN expressions of varying length and complexity.
Each expression is evaluated and any malformed expressions generate an error message.
Program output should be neat and adequately spaced for readability.
Program Implementation
Using a Stack ADT, implement the program as a Java application within a single compilation unit.
Using only integer values, implement the following operators: addition (+), subtraction (-), multiplication (*), integer division (/) and positive number exponentiation (^).
For internal documentation, use plenty of comments throughout the program.
Be sure to include your name and course/section in the application documentation block.
For grading, submit a copy of the source code and a screen snapshot of the program execution.