Skip to content

Instantly share code, notes, and snippets.

@ecojuntak
Created August 14, 2019 11:38
Show Gist options
  • Save ecojuntak/4a2d52e9f69368386474e281b8bb255e to your computer and use it in GitHub Desktop.
Save ecojuntak/4a2d52e9f69368386474e281b8bb255e to your computer and use it in GitHub Desktop.

Geometry

Problem Description

As a fan of geometry, I want to model a line based on points consisting of (x, y) co-ordinates using the cartesian system, so that I can calculate its length. Also, I want to compare two lines for equality based on the end points so that I know when two lines are the equal.

Requirements

  • Length should be accurate to 2 decimal places
  • The coordinates are integer

Dev environment setup

Build instructions

./gradlew clean build

Run test

./gradlew clean test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment