Question: Create a public class named Location. Location should define a single public constructor that accepts two fields: a latitude and longitude position, as double values,
Create a public class named Location. Location should define a single public constructor that accepts two fields: a latitude and longitude position, as double values, in that order. Your constructor should reject invalid latitude and longitude values by throwing anIllegalArgumentException. Valid longitude values are between and inclusive, while valid latitude values are between and
Provide getters but not setters for the latitude and longitude following our usual conventions.
Your class should also implement the IMovableLocation interface:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
