Assume you have the following City class:
public class City{private String name;private double north; // north latitude in degreesprivate double west; // west longitude in degrees//**************************************************************public City(String name, double latitude, double longitude){this.name = name;this.north = latitude;this.west = longitude;} // end constructor//**************************************************************public void display(){System.out.printf("%12s%6.1f%6.1f\n", name, north, west);}} // end class CityWrite a code fragment that creates an array of City objects that contains the name, latitude, and longitude of the following four cities and displays the contents of those arrays like this:
New York 41.0 74.0Miami 26.0 80.0Chicago 42.0 88.0Houston 30.0 96.0
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.