// prints countries with number of earthquakes // You will want to loop through the country markers or country features // (either will work) and then for each country, loop through // the quakes to count how many occurred in that country. // Recall that the country markers have a "name" property, // And LandQuakeMarkers have a "country" property set. private void printQuakes() { int totalWaterQuakes = quakeMarkers.size(); for (Marker country : countryMarkers) { String countryName = country.getStringProperty("name"); int numQuakes = 0; for (Marker marker : quakeMarkers) { EarthquakeMarker eqMarker = (EarthquakeMarker) marker; if (eqMarker.isOnLand()) { if (countryName.equals(eqMarker.getStringProperty("country"))) { numQuakes++; } } } if (numQuakes > 0) { totalWaterQuakes -= numQuakes; System.out.println(countryName + ": " + numQuakes); } } System.out.println("OCEAN QUAKES: " + totalWaterQuakes); }