Question: Java help please, my professor is not the best so i'm having a tough time understanding, and when I have submitted this problem before the

Java help please, my professor is not the best so i'm having a tough time understanding, and when I have submitted this problem before the work answer provided was right but was done in a more advanced way than we usually do in our intro to java, such as importing more things in at beginning or using a different main. We usually only import java.util.scanner; and then our main is always main(String[ ] args) with comment before stating @param args Command line arguments (not used). If you could help me with this using this, that would be very helpful to my understanding.

Java help please, my professor is not the best so i'm having

Expression Evaluator.java Requirements: Calculate the following expression for a value x of type double which is read in from the keyboard, and save the result of the expression in a variable of the type double. You must use the s abs0 and pow0 methods of the Math class to perform the calculation. You grt0, may use a single assignment statement with a single expression, or you may break the expression into appropriate multiple assignment statements. The latter may easier to debug if you are not getting the correct result. (3x 2x3)2 16x7 1 Next, determine the number of digits to the left and to the right of the decimal point in the unformatted result. Hint: You should consider converting the type double result into a String using the static method Double to String(result and storing it into a String variable. Then, on this String variable use the index method from the String class to find the position of the period (i.e., decimal point) and the length method to find the length of the String. Knowing the location of the decimal point and the length, you should be able to determine the number of digits on each side of the decimal point.] Finally, the result should be printed using the class java.text.DecimalFormat so that to the right of the decimal there are at most five digits and to the left of the decimal each group of three digits is separated by a comma in the traditional way. Also, there should also be at least one digit on each Page 1 of 5 Project: Using Java API Classes Page 2 of 5 de of the decimal (e.g., 0 should be printed as 0.00. Hint: Use the pattern "#,##0.OR###" in your DecimalFormat constructor. However, make sure you know what this pattem means and how to modify and use it in the future. Design Several examples of input/output for the ExpressionEvaluator program are shown below. Line number Program output alue fo Enter Resul 0.2 digits to left of decimal point: 1 digits to right of decimal point 1 Formatted Result Line number Program output alue fo Enter Resul 14264.1571 14937527 digits to left of decimal point: 5 digits to right of decimal point: 12 Formatted Result: 14,264.157 11 Line number Program output alue fo Enter 10.5 Resul 9651967.17 585 digits to left of decimi al point

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!