The latitude, longitude and place name are used to label a map. Implement a class with latitude and longitude as decimal degrees (33.755, for example) and a place name. Provide a toString method that will return an XML string with the values in this format:

   <label name="Atlanta, GA" latitude="33.755" longitude="-84.39"/>
   <label name="San Francisco, CA" latitude="37.7793" longitude="-122.4192"/>

Complete the following file:

/** A map label has a place name, longitude and latitude */ public class MapLabels { private String placeName; private double latitude; private double longitude; /** Constructs a map label with place name, logitude and latitude */ public MapLabels (String name, double aLat, double aLong) { // your work here placeName = ...; latitude = ...; longitude = ...; } /** Gets the string in XML form @return the string */ public String toString() { //your work here // use \" to print a " String label = "<label name=\"" + placeName + ...; return label; } }

Use the following file:

public class MapLabelsTester
   public static void main(String[] args)
       MapLabels label1 = new MapLabels("Atlanta, GA", 33.755, -84.39);
       System.out.println("Expected: <label name=\"Atlanta, GA\" latitude=\"33.755\" longitude=\"-84.39\"/>");

       MapLabels label2 = new MapLabels("San Francisco, CA", 37.7793, -122.4192);       
       System.out.println("Expected: <label name=\"San Francisco, CA\" latitude=\"37.7793\" longitude=\"-122.4192\"/>");