Class - type of triangle#9071

Class - type of triangle

1 second
64 megabytes
Very easy

Write a class named Triangle that includes fields for the integer coordinates of the triangle's vertices: x1, y1, x2, y2, x3, y3.

Implement the following constructors:

- A default constructor that initializes the coordinates of the triangle's vertices to zero.

- A parameterized constructor that accepts integer coordinates for the triangle's vertices and initializes them accordingly.

Implement methods to determine the type of the triangle:

- void Out(): Outputs the coordinates of the triangle, separated by spaces, and ends with a new line.

- bool equilateral(): Returns true if the triangle is equilateral; otherwise, returns false.

- bool versatile(): Returns true if the triangle is scalene; otherwise, returns false.

- bool isosceles(): Returns true if the triangle is isosceles; otherwise, returns false.

- bool rectangular(): Returns true if the triangle is right-angled; otherwise, returns false.

- bool acute_angled(): Returns true if the triangle is acute-angled; otherwise, returns false.

- bool obtuse(): Returns true if the triangle is obtuse-angled; otherwise, returns false.

For verification, you should submit only the class.

Implemented verification in C++ and Java.

Input

No input data. This is a class implementation task.

Output

No output data. To solve this problem, you only need to implement the class according to the requirements.

Note

Testing

Test . Verify the parameterized constructor and the equilateral() method.

Test . Verify the parameterized constructor and the versatile() method.

Test . Verify the parameterized constructor and the isosceles() method.

Test . Verify the parameterized constructor and the rectangular() method.

Test . Verify the parameterized constructor and the versatile() method.

Test –. Verify the parameterized constructor and the acute_angled() method.

Test –. Verify the parameterized constructor and the obtuse() method.

Test –. Verify the parameterized constructor and all methods.