Question: code in java About This Lab For this lab, we will be creating a simple expression evaluator. We will prompt the user to give us
code in java
About This Lab For this lab, we will be creating a simple expression evaluator. We will prompt the user to give us one operator and two operands, then we will process the request. Name Requirements Java file name: ExpressionEvaluator.java Main class name: Expression Evaluator Program Requirements The program shall have a separate method for each arithmetic operation (including power, "A") that will return the result Ole: add(), subtract(), etc... Note: For the power function, you CANNOT use Math.pow(), assume you will never get power = le: "1+2=3" The program shall have a method called isValidOperator that takes the input for the operator and returns a boolean value of whether or not it is a valid operator If the operator was not valid, display an error message and let the program exit Notes/Tips What data type should we be expecting from the user for the operands? THINK: If the user wanted to do 2/3, what data types would we need to provide the correct/expected result? The order in which you accept input does not matter - it is up to your desired design Remember to close the scanner at the end of the program (I will take off points if you do not close the scanner) Sample Output NOTE: Print lines with **** at the start do not need to be in your program. They are just auxiliary print statements in the example Welcome to my Expression Evaluator! Enter an operand: 2.3 Enter an operand: 2.5 Enter an operator (+,-,*,/,^): + ** Checking if '+' is a valid operator... ** '+' is a valid operator! 2.3 + 2.5 4.8 Ending program... Welcome to my Expression Evaluator! Enter an operand: I 2.6 Enter an operand: 9.7 Enter an operator (+,-, *,/,^): nuts ** Checking if 'nuts' is a valid operator... ** *nuts' is NOT a valid operator! The operator you entered was not a proper operator Ending program... Submission For this lab, you are encouraged to practice submitting via GitHub Classroom. Simply accept the assignment through this link and clone the repository to your local machine. You are encouraged to try working on separate branches, but keep in mind it is your main/master branch that will be graded. I will be checking last commit times for everything, and will be taking off late points accordingly, so be vigilant! You can submit this lab as just a java file if you would like, but those who submit through GitHub will get +10 extra credit points