The web sites and contain baby names sorted by popularity. The format is very simple: name, frequency, cumulative frequency, and rank. Load these pages into your browser to see for yourself.

Your task is to write a program that connects to these sites and prints the top 50% of male and female names. Stop when the cumulative percentage has exceeded 50%.

Complete the following file:

import; import; import; import; import; import; import; import java.util.Scanner; public class PopularNames { public static void main(String[] args) throws IOException { System.out.println("Male:"); printPopularNames(""); System.out.println("Female:"); printPopularNames(""); } public static void printPopularNames(String urlString) throws IOException { // Connect to server // Check if response code is HTTP_OK (200) // Read server response while (. . .) { // Read one record // Print rank and name } } }