Question: Write a program that prompts the user to enter one of the filenames described in Programming Exercise 12.31 and displays the names that are used

Write a program that prompts the user to enter one of the filenames described in Programming Exercise 12.31 and displays the names that are used for both genders in the file. Use sets to store names and find common names in two sets. Here is a sample run:

Enter a file name for baby name ranking: babynamesranking2001. txt erter 69

Enter a file name for baby name ranking: babynamesranking2001. txt erter 69 names used for both genders They are Tyler Ryan Christian

Step by Step Solution

3.47 Rating (160 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

import javautilScanner import javautil import javaio public class Exercise2112 public ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Introduction to Java Programming and Data Structure Questions!