Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started