Question: using java 4. You are asked to write a program (name the class Lab3_1) that will take a math problem as a single string command

using java
4. You are asked to write a program (name the class Lab3_1) that will take a math problem as a single string command line input and solve it. Assume that the command line input has the form 123+239, 45*4, or 2/3. Also assume that the string contains two integers separated by a +, -,\, or sign and does not contain other characters. This program requires you to use String class methods. (You have written similar program last semester.) (This exercise is worth 50 points.) Sample Runs from DrJava Interaction window: > run Lab2 2 4+5 4+5 = 9 > run Lab2 2 4/5 4/5 = 0 > run Lab2 2 4/0 Cannot divide by 0 > run Lab2 2 4*8 4*8 = 32 > run Lab2 2 No command line input
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
