Explore BrainMass
Share

Explore BrainMass

    Calculate Volume, and Time to Fill a Swimming Pool in Java

    This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

    Develop a Java program which, given the width, length and depth (in metres), of a swimming pool, determines and outputs: (a) the volume in litres, and (b) the time in hours to fill the swimming pool. Assume the rate of flow into the pool is 2.5 litres per second. Note: 1 litre = 1000 cubic centimetres, therefore 10 litres = 0.01 cubic metre, hence 1 metre = 1000 litres (see Figure below).

    Write the source code for each class in a separate file which must have the same name as the class name together with the extension .java. Remember also that by convention, class names commence with a capital letter.

    Provide a well-structured solution that is easy to read. You should use meaningful identifier names and should provide useful comments.

    © BrainMass Inc. brainmass.com October 9, 2019, 6:33 pm ad1c9bdddf
    https://brainmass.com/computer-science/java/calculate-volume-and-time-to-fill-a-swimming-pool-in-java-91441

    Attachments

    Solution Preview

    /**
    * Created by IntelliJ IDEA.
    * User: Mahmood
    * Date: Aug 11, 2006
    * Time: 12:32:46 AM
    * To change this template use File | Settings | File Templates.
    */
    import java.io.*;

    /**
    * Created by Abdun Mahmood
    * Date: Aug 10, 2006
    * Time: 11:55:21 PM
    * To change this template use File | Settings | File Templates.
    */
    public class fillCube {
    public static void main( String[] args){
    InputStreamReader stdin = new InputStreamReader(System.in);
    BufferedReader console = new ...

    Solution Summary

    A well-structured solution that is easy to read. Also contains meaningful identifier names and useful comments.

    $2.19