Purchase Solution

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

Not what you're looking for?

Ask Custom Question

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.

Attachments
Purchase this Solution

Solution Summary

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

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 ...

Purchase this Solution


Free BrainMass Quizzes
Word 2010: Tables

Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.

Basic Networking Questions

This quiz consists of some basic networking questions.

Inserting and deleting in a linked list

This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.

Basic Computer Terms

We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.

Java loops

This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.