Question: Write a Java program that computes the volume of a rectangular object. The volume must be formatted to two decimal places, e.g. 12.48. The formula
Write a Java program that computes the volume of a rectangular object. The volume must be formatted to two decimal places, e.g. 12.48.
The formula is:
Volume= length*width*height
The units for volume is units cubed. For example, if length, width, and height are given in inches, then the units for volume would be inches3, which we call "cubic inches".
Inputs: The program should ask the user to enter the length (L), width (W), and height (H) for the object in inches. So there are three inputs to the program.
Outputs: The program should have this output (below is an example):
The volume for a cube
Where V is the volume your program calculates.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
