Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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 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
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