Question: Please use java, thank you. Work2-3 Write a program named CircleSphere that prompts the user for a double value representing a radius. The program must
Write a program named CircleSphere that prompts the user for a double value representing a radius. The program must then use the radius to determine and output the following: circlecircumference=2rcircleArea=r2sphereArea=4r2spherevolume=(4/3)r3 Note: You must use II as defined in the java.lang.Math class. Recall that int, float, and double divisions produce different results. Recall that there are multiple ways to calculate r2 and r3. Recall that floating point arithmetic rounds differently for different formulations of a calculation. The prompt to the user to enter the radius must be: Enter radius: The output must be in the format: Circle circumference = circlecircumference Circle Area = circleArea Sphere Area = aphereArea Sphere Volume = spherevolume Please make sure to end each line of output with a newline. Please note that your class should be named CircleSphere
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
