Write a class named Rectangle that satisfies all of the foll…
Write a class named Rectangle that satisfies all of the following requirements: Contains private instance variables:double widthdouble heightContains a private static variable named rectangleCount that tracks how many Rectangle objects have been created.Contains a public class constant named DEFAULT_SIZE initialized to 1.0.Includes a no-argument constructor that sets both dimensions to DEFAULT_SIZE and updates rectangleCount.Includes a constructor that accepts two double parameters.If either parameter is less than or equal to 0, set that dimension to DEFAULT_SIZE.Use this where appropriate.Update rectangleCount.Includes accessor and mutator methods for both fields.Mutators should reject values less than or equal to 0.Includes methods:getArea()getPerimeter()Includes a static method getRectangleCount() that returns the total number of Rectangle objects created.Show all work and proper Java syntax.