As you learned earlier, an enumerated type is a class (albeit a special kind of class). As

Question:

As you learned earlier, an enumerated type is a class (albeit a special kind of class). As such, you can add a main method to it and have that main method run the enumerated type as a program. Enhance this chapter’s City enumerated type by adding a main method that uses a for- each loop with a printf statement to display all cities and their properties. Specifically, it should display each city name followed by its latitude and longitude, like this:

  1. PARKVILLE 39.2-94.7 HAVANA 23.1-82.4 KINGSTON NASSAU SAINT THOMAS 18.0 -76.8 25.1 -77.3 18.3 -64.9
Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: