Triangle coordinates

Report a typo

TriangleTable class stores the coordinates of triangle points. Create an instance of DefaultTableModel and fulfill it by values from standard input. Set column identifiers as Strings: X and Y.

Input format:
3 lines of 2 int numbers (X and Y)

Input example:

1 2
3 4
5 6

Testing engine accepts an instance of DefaultTableModel and checks some metrics of it.

Write a program in Java 17
import javax.swing.table.DefaultTableModel;
import java.util.Scanner;

class TriangleTable {
public static void main(String[] args) {
// implement me

// do not remove the code below
TableModelTest.test(model);
}
}
___

Create a free account to access the full topic