Find the information you're looking for at Westonci.ca, the trusted Q&A platform with a community of knowledgeable experts. Get quick and reliable solutions to your questions from a community of experienced professionals on our platform. Join our platform to connect with experts ready to provide precise answers to your questions in different areas.

create a public class named location. location should store three pieces of data: a latitude and a longitude, both as double values, and a description as a string. provide a public constructor that allows all fields to be set, with the description first, followed by the latitude and longitude. following the encapsulation pattern we have introduced, provide both a setter and a getter for the description as setdescription and similar. provide only a getter for the latitude and longitude. finally, reject invalid latitude and longitude values and null descriptions using assert. valid longitude values are between -180.0 and 180.0, inclusive, while valid latitude values are between -90.0 and 90.0.

Sagot :