Calculate the volume at a given pressure - Java Quiz Question


Given the volume at a pressure, write a program to get the volume at a different pressure. According to the Boyle's law, the pressure of a gas is inversely proportional to the volume.

Input (double, double, double) Output (Double)
20.0, 10.0, 14.0 28.0
200.0, 100.0, 180.0 360.0
65.2, 39.2, 39.4 65.2
111.0, 122.0, 133.0 121.0082
28.0, 0.0, 44.0 null



class CalculateTheVolume
{
    public static void main(String s[])
    {
        System.out.println("Volume at given pressure is : " + getVolume(20.0, 14.0, 10.0));

    }


    public static Double getVolume(double pressure1, double volume1, double pressure2) {
    }

}