Skip to content

Commit 2113308

Browse files
committed
Fix
1 parent 77f739b commit 2113308

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/main/java/com/thealgorithms/divideandconquer/ConvexHull.java

+9-4
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,16 @@
1818
* 2. Recursive (Divide-and-Conquer) Method
1919
*/
2020
class Point implements Comparable<Point> {
21-
double x, y;
21+
double x;
22+
double y;
2223

2324
/**
2425
* Constructor to initialize a point with x and y coordinates.
2526
*
2627
* @param x The x-coordinate of the point.
2728
* @param y The y-coordinate of the point.
2829
*/
29-
public Point(double x, double y) {
30+
Point(double x, double y) {
3031
this.x = x;
3132
this.y = y;
3233
}
@@ -55,7 +56,9 @@ public int compareTo(Point other) {
5556
*/
5657
@Override
5758
public boolean equals(Object obj) {
58-
if (!(obj instanceof Point)) return false;
59+
if (!(obj instanceof Point)) {
60+
return false;
61+
}
5962
Point other = (Point) obj;
6063
return this.x == other.x && this.y == other.y;
6164
}
@@ -86,7 +89,9 @@ public String toString() {
8689
* 1. Brute-force method
8790
* 2. Recursive (divide-and-conquer) method
8891
*/
89-
public class ConvexHull {
92+
public final class ConvexHull {
93+
private ConvexHull() {
94+
}
9095

9196
/**
9297
* Computes the determinant of three points to determine their orientation.

0 commit comments

Comments
 (0)