Question: Create the following table: The baby name ranking data was described in Programming Exercise 12.31. Write a program to read data from the following URL
Create the following table:
The baby name ranking data was described in Programming Exercise 12.31. Write a program to read data from the following URL and store into the Babyname table.http://www.cs.armstrong.edu/liang/data/babynamesranking2001.txt,?http://www.cs.armstrong.edu/liang/data/babynamesranking2010.txt.
The popularity ranking of baby names from years 2001 to 2010 is downloaded from www.ssa.gov/oact/babynames and stored in files named babynameranking2001.txt, babynameranking2002.txt, . . . , babynameranking2010.txt. Each file contains one thousand lines. Each line contains a ranking, a boy?s name, number for the boy?s name, a girl?s name, and number for the girl?s name. For example, the first two lines in the file babynameranking2010.txt are as follows:
1 |
Jacob |
21,875 |
Isabella |
22,731 |
2 |
Ethan |
17,866 |
Sophia |
20,477 |
So, the boy?s name Jacob and girl?s name Isabella are ranked #1 and the boy?s name Ethan and girl?s name Sophia are ranked #2. 21,875 boys are named Jacob and 22,731 girls are named Isabella. Write a program that prompts the user to enter the year, gender, and followed by a name, and displays the ranking of the name for the year. Here is a sample run:

create table Babyname ( year integer, name varchar(50), gender char(1), count integer, constraint pkBabyname primary key (year, name, gender) ); Enter the year: 2010 JEnter Enter the gender: M -Erter Enter the name: Javier Jtnter Javier is ranked #190 in year 2010 Enter the year: 2010 JEnter Enter the gender: F PEnter Enter the name: ABC JEnker The name ABC is not ranked in year 2010
Step by Step Solution
3.43 Rating (169 Votes )
There are 3 Steps involved in it
Program Plan Create a new class CreatingBabyNameTable Create a method initDataBase which creates a n... View full answer
Get step-by-step solutions from verified subject matter experts
