As a fan of geometry, I want to model a line based on points consisting of (x, y) coordinates using the cartesian system. So that I can calculate its length.
- Have an IDE for Java installed (e.g. Netbeans, Intellij, Eclipse)
- JDK 11.0 or higher installed (see this link for installation)
- JUnit 5.0 or higher installed, for running the tests (see this link for installation)
Geometry geometry = new Geometry();
int [] firstPoint = {1, 2};
int [] secondPoint = {3, 4};
double lineLength = geometry.calculateDistance(firstPoint, secondPoint);
- Open a terminal
- Change the working directory into the current project directory
- Execute
./gradlew build
in your terminal
Can't, since this is a library only
- Open a terminal
- Change the working directory into the current project directory
- Execute
./gradlew test
in your terminal