For this Question: The Swimming Company has asked you to write an application that calculates the volume of cuboid shaped pools.

1. Write a class with the name <b>Rectangle</b>. The class needs two fields (instance variable) with name width and length both of type double.
The class needs to have one constructor with parameters width and length respectively in order, both of type double and it needs to initialize the fields.
In case the width parameter is less than 0 it needs to set the width field value to 0.
In case the length parameter is less than 0 it needs to set the length field value to 0.

Write the following methods (instance methods):
 * Method named getWidth without any parameters, it needs to return the value of width field.
 * Method named getLength without any parameters, it needs to return the value of length field.
 * Method named getArea without any parameters, it needs to return the calculated area (width * length).


2. Write a class with the name <b>Cuboid </b> that extends Rectangle class. The class needs one field (instance variable) with name height of type double.
The class needs to have one constructor with three parameters width, length, and height all of type double respectively in order in function. It needs to call parent constructor and initialize a height field.
In case the height parameter is less than 0 it needs to set the height field value to 0.

Write the following methods (instance methods):
 * Method named getHeight without any parameters, it needs to return the value of height field.
 * Method named getVolume without any parameters, it needs to return the calculated volume. To calculate volume multiply the area with height.
 
NOTE:
 * All methods should be defined as public NOT public static.
 * In total, you have to write 2 classes.
 * Do not add a main method to the solution code.You don't have to take any input, You have to write two classes <b>Rectangle</b> and  <b>Cuboid </b>..Output will be printed by tester, "Correct" if your code is perfectly fine otherwise "Wrong".Sample Test Code:
 <code>
    Rectangle rectangle = new Rectangle(2, 4);
    if(rectangle.getWidth() == 2)
            System.out.println("Correct");
    else
           System.out.println("Wrong");
</code>

Sample Output:
Correct, I have written this Solution Code: class Rectangle {
    private double width,length;
    public Rectangle(double width,double length)
    {
        this.width=(width < 0?0:width);
        this.length=(length<0?0:length);
    }
    public double getWidth(){
        return this.width;
    }
    public double getLength(){
        return this.length;
    }
    public double getArea(){
        return this.length*this.width;
    }

}

class Cuboid extends Rectangle {
    private double height;
    public Cuboid(double width,double length,double height){
        super(width,length);
        this.height=(height<0?0:height);
    }
    public double getHeight(){
        return this.height;
    }
    public double getVolume(){
        return super.getArea()*this.getHeight();
    }
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?