Question: Create a class called Location that stores two int values representing the location of a place on the surface of the Earth. Location should implement
Create a class called Location that stores two int values representing the location of a place on the surface of the Earth. Location should implement a function called setX that accepts a single int and changes the saved x value. It should not return a value. Simple should also implement a function called getX that returns the saved x value. Complete the analogous methods for y
Note that you should include public before your class definition for this problem. We've provided starter code that does that. If that doesn't fully make sense yet, don't worry. It will soon.
public class location
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
