Question: Write a program that performs the following mathematical tasks in the following order, using double values for all input and calculations and Math.PI when the


Write a program that performs the following mathematical tasks in the following order, using double values for all input and calculations and Math.PI when the value of is required. 1. Ask the user for the length of a side of a square, output the area of the square using Math.pow and the formula a 2. Ask the user for the length of a side of a cube, output the volume of the cube using Math.pow and the formula a 3. Ask the user for the radius of a circle, output the area of the circle using Math.PI and Math.pow and the formula tr 4. Ask the user for the length of a side of a cube, output the surface area using Math.pow and the formula 6a 5. Ask the user to input two numbers and output the larger of the two numbers using Math.max 6. Ask the user to input two numbers and output the smaller of the two numbers using Math. min output all results with 3 significant digits after the decimal point. Goals Use the Math class correctly in a program. Create and use variables of data type double correctly Use Java API class methods in a program. Use System.out.print f to output your results with a particular number of decimal points of precision Class and File Namin Name your class Net ID Mathstuff and source file NetID Mathstuff.java, using your UNO NetID. For example, for Loki account jsmith, they would create a class jsmith Mathstuff Points to Think About You will not actually be writing the methods above and don't need to write any methods other than main Grading Notes Remember that your program requires a complete, digitally signed Honor Pledge to be graded. Name your class according to the "Class and File Name" section above. You may only use material through lecture #13 Make sure to use a double variable for the input value so that large results can be calculated. Output your results in the order you see the operations listed above with 3 significant digits after the decimal point
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
