Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.
A triangle is is a polygon with three edges and three vertices. It
12:14 AM Sat Jun* 0 37%Not Secure - mylinux.langara.bc.capoints ,ABC.You may only accept the points located on the 40 X 40 grid (min :0, max 40).Your program should be repeated as long as the user wishes.You need to create and use the following methods in your implementation besides any othermethods that is needed for this lab assignment.Takes coordinates of (x,y) and returns true, if they are positive, and they are in range [0 - 40], othersieit returns falsepublic static boolean verify_input (int x, int y)Takes coordinates of two points (x1,y1), (x2,y2), then calculates and returns their distancepublic static double distance (int x1, int yl, int x2, int y2)Takes the three coordinates of the triangle, (xA, yA), (xB, yB), (xC, yC), and returns its permeterpublic static double perimeter (int xA, int yA, int xB, int yB, int xC, int yC)Takes the three coordinates of the triangle, (xA, yA), (xB, yB), (xC, yC), and returns its areapublic static double area (int XA, int yA, int xB, int yB, int xC, int yC)The sample run of the program follows. The values indicated as bold are the values entered by the user.Enter the coordinates of triangle ABCx- coordinate of A: 5y-coordinate of A:x- coordinate of B: 6y- coordinate of B:x- coordinate of C:y- coordinate of C:Triangle: A(5, 5), B(6, 7), and C(8, 5)Perimeter = 8. 064495Area= 2. 999999Would you like to repeat the program (1 for yes, 2 for no) ? 1Enter the coordinates of triangle ABCx- coordinate of A: 5y- coordinate of A: 50x- coordinate of B: 6y- coordinate of B: -7x- coordinate of C: 8y - coordinate of C: !coordinate (5,50) is not in acceptable rangecoordinate (6, -7) is not in acceptable rangeWould you like to repeat the program (1 for yes, 2 for no)? 2End of the program.