TOPICS: Using Classes and Objects MUST BE IN JAVA. PLEASE USE COMMENTS AND WRITE THE CODE IN SIMPLEST FORM.  3. Write an application that reads the radius of a sphere then calculates and displays the circumference, volume and surface area. Use the following formulas, in which r represents the sphere’s radius. Print the output to four decimal places. Circumference = 2 π r Volume = 4/3 π r3 Surface Area = 4 π r2 Hint: Section 3.5 of the textbook describes the many methods of the Math class and how they are used. The Math class also contains pre-defined constants like π. Search on the web for how you can use these. Testing: Include test exhibits for inputs that you choose. Make sure you check the results either with a calculator or some other independent source. Hint: Try Google!

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter8: Arrays
Section: Chapter Questions
Problem 5GZ
icon
Related questions
Question

TOPICS: Using Classes and Objects

MUST BE IN JAVA. PLEASE USE COMMENTS AND WRITE THE CODE IN SIMPLEST FORM. 

3. Write an application that reads the radius of a sphere then calculates and displays the circumference, volume and surface area. Use the following formulas, in which r represents the sphere’s radius. Print the output to four decimal places.
Circumference = 2 π r
Volume = 4/3 π r3
Surface Area = 4 π r2

Hint: Section 3.5 of the textbook describes the many methods of the Math class and how they are used. The Math class also contains pre-defined constants like π. Search on the web for how you can use these.

Testing: Include test exhibits for inputs that you choose. Make sure you check the results either with a calculator or some other independent source. Hint: Try Google!

Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Random Class and its operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,