Question: Part 1 : Working with Expressions ( 1 0 pts ) Description Write a Java program to do the following: 1 . Prompt the user
Part : Working with Expressions
pts
Description
Write a Java program to do the following:
Prompt the user to enter the diameter of a sphere.
Read in and store the number into a variable called diameter declare as int
Calculate and store the radius in an appropriately named variable declare as double Note: the diameter is twice as long as the radius.
Define a constant and name it PI to store the value of the
Compute the volume of a sphere and store the value in an appropriately named variable. Use the following formula:
Note: Dont use any Math methods.
Print your results to the screen with an appropriate message.
Compile, debug, and run using the following test data and record the results.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
