Program can model a line based on points consisting of (x, y) coordinates using the cartesian system and program can calculate its length.
The project needs these dependencies:
- JRE/JDK 15.0.2
- Gradle
- JUnit 5
- Clone the repository
- Build the program
- Use built in "build" button in IntelliJ or
- Use command "./gradlew build" on terminal
- Run the test Suite GeometryTest.java in src/test/java folder using command
./gradlew test
There is no main class for this program. You can import the src/main/java program to your own program to be able to use the Line model
To create a line:
- Make 2 points like this:
Point point1 = new Point(x,y)
Point point2 = new Point(x,y)
- Assign those 2 points to new Line
Line line = new Line(point1, point2)