info@meritcampus.com    +91-85006-22255
...

Write a program to find if the given points form a rhombus. Points are given in anti clock wise direction starting from bottom left point.

Input (Point, Point, Point, Point) Output (boolean)
`[0, 0], [5, 0], [8, 4], [3, 4]` true
`[-4, 0], [0, -5], [4, 0], [0, 5]` true
`[4, 2], [6, 3], [6, 5], [4, 4]` false
` [-2, -2], [2, -2], [2, 0], [-2, 0]` false
`[2, 1], [8, 1], [9, 8], [6, 6]` false

``` class IsARhombus {     public static void main(String s[])    {        Point firstPoint = new Point(0, 0);        Point secondPoint = new Point(5, 0);        Point thirdPoint = new Point(8, 4);        Point fourthPoint = new Point(3, 4);        System.out.println("Is a rhombus : " + isARhombus(firstPoint, secondPoint, thirdPoint, fourthPoint));    }     public static boolean isARhombus(Point firstpoint, Point secondPoint, Point thirdPoint, Point fourthPoint) { ```
```     }      ```
``` } class Point { double x; double y; Point(double x, double y) { this.x = x; this.y = y; } } ```
0
Wrong
Score more than 2 points