Question: IN JAVA PLS Create a public class named Position. Position should define a single public constructor that accepts two fields: a latitude and longitude value,
IN JAVA PLS
Create a public class named Position. Position should define a single public constructor that accepts two fields: a latitude and longitude value, as double values, in that order. Your constructor should reject invalid latitude and longitude values. Valid longitude values are between -180.0 and 180.0, inclusive, while valid latitude values are between -90.0 and 90.0, inclusive.
Position should also implement the Java Comparable
You will probably need to review the documentation for Comparable. Because we are using the type parameter Position to the Comparable interface, compareTo accepts an Position as an argument.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
