Write a class Triangle that contains integer fields representing the coordinates of the triangle's vertices: x1, y1, x2, y2, x3, y3.
Implement the following constructors:
A default constructor that initializes all vertex coordinates to zero;
A parameterized constructor that receives the coordinates of the triangle's vertices and initializes them.
Implement the following methods:
void Out() – outputs the coordinates of the triangle separated by spaces and prints a newline at the end;
double area() – returns the area of the triangle;
double perimeter() – returns the perimeter of the triangle;
double inscribedRadius() – returns the radius of the inscribed circle (incircle) of the triangle;
double describedRadius() – returns the radius of the circumscribed circle (circumcircle) of the triangle.
You only need to submit the class.
The checker has been implemented in C++, C#, and Java.
Test 1. Checks the parameterized constructor and the method area().Test 2. Checks the parameterized constructor and the method perimeter().Test 3. Checks the parameterized constructor and the method describedRadius().Test 4. Checks the parameterized constructor and the method inscribedRadius().Test 5. Checks the parameterized constructor and the methods area() and perimeter().Test 6. Checks the parameterized constructor and all calculation methods.Test 7. Checks the default constructor, parameterized constructor, and the output method.