1) Using JOptionPanes to handle your input and output, 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 cubic 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. Class names commence with a capital letter. Use meaningful identifier names and should provide useful comments. This section contains the following elements: The projects only use JDK and an editor (textPad, notepad, notepad++, etc). Do not use Java packages to package the classes, use APIs provided by Java SDK. Give some appropriate introduction and discussion of your answers. Comments the code of the program. Project must have at least THREE (3) java classes. Do not use code generator. References with Harvard style at least 3 Academic Articles or books. Please, make sure that there is no Plagiarism.

Introduction:
In this assignment, we are required to develop a Java program that calculates the volume and time required to fill a swimming pool. The program will take inputs for the width, length, and depth of the pool in meters and use JOptionPanes to handle input and output. Additionally, we will assume a constant flow rate of 2.5 liters per second for filling the pool.

Approach:
To solve this problem, we will divide the task into three separate classes: the main class, the Pool class, and the Conversion class. The main class will handle user input and output, while the Pool class will contain the calculation logic. The Conversion class will be responsible for converting liters to cubic meters and vice versa. We will use meaningful identifier names and provide useful comments to enhance code readability.

Discussion:
The main class will prompt the user to enter the width, length, and depth of the swimming pool using JOptionPanes. The input values will be passed to the Pool class, where the volume in liters and the time in hours to fill the pool will be calculated.

To calculate the volume, we will multiply the width, length, and depth of the pool. However, since the input dimensions are in meters, and we need to convert the result to liters, we will utilize the Conversion class. The Conversion class will have a method to convert cubic meters to liters by multiplying the volume by 1000.

After calculating the volume, we can determine the time required to fill the pool. Since the flow rate is given as 2.5 liters per second, we will divide the volume by the flow rate to obtain the time in seconds. To convert this value to hours, we will divide the time by 3600 (the number of seconds in an hour).

Finally, the main class will display the calculated volume and time in hours using JOptionPanes.

To ensure the program meets academic standards, we will include references to at least three academic articles or books, using the Harvard referencing style. Additionally, we will avoid using code generators and packages, relying solely on the Java SDK APIs.

Conclusion:
In conclusion, this assignment requires the development of a Java program that calculates the volume and time required to fill a swimming pool. By dividing the task into three classes and using JOptionPanes for input and output handling, we can provide an efficient and organized solution. The use of meaningful identifier names, useful comments, and adherence to academic standards will enhance the quality and readability of the code.

Need your ASSIGNMENT done? Use our paper writing service to score better and meet your deadline.


Click Here to Make an Order Click Here to Hire a Writer