Question: Write a java program that analyzes a text file and performs simple math operations, for each line of the file. The program should catch exceptions
Write a java program that analyzes a text file and performs simple math operations, for each line of
the file. The program should catch exceptions when the action cannot be executed, it should display
an appropriate message, and move to the next line.
Operations are limited to additionsubtraction divisionmultiplication up to two operations
and a single parenthesis. Define your own exceptions, including the following exemplary situations:
syntax error: expected
a
cg~pm Z
syntax error: expected
Zero Division Error
runtime error: a undefined
integer limit bit required
illegal characters
If the text file is missingcannot be opened, the program should display an appropriate message.please make sure each step is followes carefully.e
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
