Answered step by step
Verified Expert Solution
Link Copied!

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
image text in transcribed
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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Next Generation Databases NoSQLand Big Data

Authors: Guy Harrison

1st Edition

1484213300, 978-1484213308

More Books

Students also viewed these Databases questions

Question

13-6 How will MIS help my career?

Answered: 1 week ago