Question
A Java question. The United States Social Security Administration keeps lists of the most popular baby names by year and by decade. We have two
A Java question. The United States Social Security Administration keeps lists of the most popular baby names by year and by decade. We have two list:, one from the 1900 to 1909 and one 100 years later from the 2000 to 2009. Each contains the top names for the decade. We want to know what names from the 1900s were still popular in the 2000s.
Write an application called BabyNames1900sAnd2000s to print two columns in alphabetical order. The first column will contain all the boys names for 1900s that were still popular in 2000s. The second column will contain all the girls names for 1900s that were still popular in 2000s. Make the columns 30 characters wide and left justified.
The file was as follow:
------------------------------------------babynames1900s.txt------------------------------------------
Males Females Rank Name Number Name Number 1 John 84,591 Mary 161,508 2 William 69,321 Helen 69,429 3 James 62,170 Margaret 57,921 4 George 43,589 Anna 54,918 5 Charles 36,186 Ruth 51,011 6 Robert 35,850 Elizabeth 41,708 7 Joseph 35,173 Dorothy 39,112 8 Frank 29,046 Marie 37,089 9 Edward 24,515 Florence 36,191 10 Thomas 21,785 Mildred 36,173 11 Henry 21,773 Alice 35,233 12 Walter 19,997 Ethel 34,868 13 Harry 17,906 Lillian 32,519 14 Willie 17,746 Gladys 30,285 15 Arthur 15,408 Edna 29,832 16 Albert 15,318 Frances 28,499 17 Clarence 13,573 Rose 28,107 18 Fred 13,076 Annie 27,748 19 Harold 12,796 Grace 26,926 20 Paul 12,637 Bertha 24,247 21 Raymond 11,651 Emma 24,176 22 Richard 10,678 Bessie 23,984 23 Roy 10,633 Clara 23,899 24 Joe 10,466 Hazel 23,802 25 Louis 10,373 Irene 23,656 26 Carl 9,865 Gertrude 23,607 27 Ralph 9,300 Louise 22,862 28 Earl 9,251 Catherine 22,007 29 Jack 9,222 Martha 21,750 30 Ernest 8,657 Mabel 21,625 31 David 8,623 Pearl 20,914 32 Samuel 8,149 Edith 20,884 33 Howard 8,014 Esther 20,026 34 Charlie 7,928 Minnie 19,715 35 Francis 7,021 Myrtle 19,691 36 Herbert 6,957 Ida 18,866 37 Lawrence 6,847 Josephine 18,786 38 Theodore 6,490 Evelyn 18,602 39 Alfred 6,356 Elsie 18,452 40 Andrew 6,281 Eva 18,357 41 Elmer 6,161 Thelma 18,265 42 Sam 6,161 Ruby 18,176 43 Eugene 5,909 Agnes 17,617 44 Leo 5,629 Sarah 17,343 45 Michael 5,222 Viola 16,559 46 Lee 5,158 Nellie 16,339 47 Herman 5,065 Beatrice 16,282 48 Anthony 5,043 Julia 16,107 49 Daniel 5,036 Laura 15,534 50 Leonard 5,022 Lillie 15,390 51 Floyd 4,968 Lucille 15,041 52 Donald 4,633 Ella 14,764 53 Kenneth 4,579 Virginia 14,539 54 Jesse 4,559 Mattie 13,838 55 Russell 4,552 Pauline 13,310 56 Clyde 4,524 Carrie 13,140 57 Oscar 4,517 Alma 13,092 58 Peter 4,376 Jessie 12,756 59 Lester 4,361 Mae 12,711 60 Leroy 4,300 Lena 12,703 61 Ray 4,257 Willie 12,357 62 Stanley 4,156 Katherine 12,105 63 Clifford 4,055 Blanche 11,730 64 Lewis 4,042 Hattie 11,717 65 Benjamin 4,009 Marion 11,713 66 Edwin 3,961 Lucy 11,020 67 Frederick 3,900 Stella 11,013 68 Chester 3,788 Mamie 10,618 69 Claude 3,704 Vera 10,457 70 Eddie 3,695 Cora 10,372 71 Cecil 3,610 Fannie 10,346 72 Lloyd 3,507 Eleanor 10,030 73 Jessie 3,378 Bernice 10,010 74 Martin 3,346 Jennie 9,988 75 Bernard 3,296 Ann 9,933 76 Tom 3,293 Leona 9,849 77 Will 3,246 Beulah 9,716 78 Norman 3,178 Lula 9,518 79 Edgar 3,154 Rosa 9,297 80 Harvey 3,104 Ada 9,121 81 Ben 3,028 Ellen 8,340 82 Homer 2,915 Kathryn 8,334 83 Luther 2,866 Maggie 8,289 84 Leon 2,859 Doris 8,253 85 Melvin 2,840 Dora 8,011 86 Philip 2,817 Betty 7,921 87 Johnnie 2,781 Marguerite 7,912 88 Jim 2,718 Violet 7,844 89 Milton 2,695 Lois 7,691 90 Everett 2,597 Daisy 7,687 91 Allen 2,558 Anne 7,615 92 Leslie 2,531 Sadie 7,461 93 Alvin 2,484 Susie 7,311 94 Victor 2,447 Nora 7,172 95 Marvin 2,324 Georgia 7,142 96 Stephen 2,247 Maude 7,142 97 Alexander 2,231 Marjorie 7,025 98 Jacob 2,191 Opal 6,791 99 Hugh 2,176 Hilda 6,783 100 Patrick 2,141 Velma 6,558 101 Virgil 2,134 Emily 6,423 102 Horace 2,125 Theresa 6,396 103 Glenn 2,122 Charlotte 6,193 104 Oliver 2,088 Inez 6,115 105 Morris 2,059 Olive 6,027 106 Vernon 2,054 Flora 6,015 107 Archie 2,048 Della 5,958 108 Julius 2,038 Lola 5,949 109 Gerald 2,014 Jean 5,931 110 Maurice 1,981 Effie 5,870 111 Sidney 1,981 Nancy 5,733 112 Marion 1,967 Nettie 5,680 113 Otis 1,966 Sylvia 5,559 114 Vincent 1,954 May 5,546 115 Guy 1,913 Lottie 5,482 116 Earnest 1,907 Alberta 5,475 117 Wilbur 1,839 Eunice 5,376 118 Gilbert 1,822 Sallie 5,306 119 Willard 1,821 Katie 5,304 120 Ed 1,814 Genevieve 5,292 121 Roosevelt 1,790 Estelle 5,256 122 Hubert 1,771 Lydia 5,242 123 Manuel 1,750 Loretta 5,151 124 Warren 1,748 Mable 5,149 125 Otto 1,746 Goldie 4,966 126 Alex 1,745 Eula 4,872 127 Ira 1,714 Rosie 4,828 128 Wesley 1,693 Lizzie 4,824 129 Curtis 1,683 Vivian 4,818 130 Wallace 1,654 Verna 4,752 131 Lonnie 1,645 Ollie 4,725 132 Gordon 1,642 Harriet 4,600 133 Isaac 1,638 Lucile 4,566 134 Jerry 1,636 Addie 4,563 135 Charley 1,633 Marian 4,532 136 Jose 1,628 Henrietta 4,514 137 Nathan 1,616 Jane 4,499 138 Max 1,567 Lela 4,473 139 Mack 1,562 Essie 4,467 140 Rufus 1,552 Caroline 4,276 141 Arnold 1,546 Ora 4,262 142 Irving 1,525 Iva 4,212 143 Percy 1,517 Sara 4,210 144 Bill 1,513 Maria 4,175 145 Dan 1,500 Madeline 4,079 146 Willis 1,468 Rebecca 4,052 147 Bennie 1,439 Wilma 4,012 148 Jimmie 1,372 Etta 4,003 149 Orville 1,365 Barbara 4,002 150 Sylvester 1,343 Rachel 3,974 151 Rudolph 1,339 Kathleen 3,923 152 Glen 1,337 Irma 3,909 153 Nicholas 1,334 Christine 3,901 154 Dewey 1,320 Geneva 3,861 155 Emil 1,319 Sophie 3,839 156 Roland 1,316 Juanita 3,837 157 Steve 1,307 Nina 3,743 158 Calvin 1,291 Naomi 3,700 159 Mike 1,281 Victoria 3,692 160 Johnie 1,276 Amelia 3,664 161 Bert 1,253 Erma 3,623 162 August 1,245 Mollie 3,475 163 Clifton 1,198 Susan 3,450 164 Franklin 1,196 Flossie 3,410 165 Matthew 1,190 Ola 3,410 166 Emmett 1,187 Nannie 3,391 167 Phillip 1,161 Norma 3,335 168 Wayne 1,158 Sally 3,295 169 Edmund 1,151 Olga 3,172 170 Abraham 1,145 Alta 3,091 171 Nathaniel 1,143 Estella 3,068 172 Marshall 1,135 Celia 2,971 173 Dave 1,133 Freda 2,932 174 Elbert 1,131 Isabel 2,926 175 Clinton 1,122 Amanda 2,923 176 Felix 1,108 Frieda 2,897 177 Alton 1,103 Luella 2,895 178 Ellis 1,100 Matilda 2,892 179 Nelson 1,064 Janie 2,853 180 Amos 1,062 Fern 2,813 181 Clayton 1,057 Cecelia 2,793 182 Aaron 1,049 Audrey 2,707 183 Perry 1,047 Winifred 2,689 184 Adam 1,021 Elva 2,677 185 Tony 1,020 Ina 2,667 186 Irvin 1,007 Adeline 2,646 187 Jake 989 Leola 2,615 188 Dennis 988 Hannah 2,605 189 Jerome 972 Geraldine 2,589 190 Mark 972 Amy 2,576 191 Cornelius 956 Allie 2,574 192 Ollie 952 Miriam 2,566 193 Douglas 950 Isabelle 2,514 194 Pete 949 Bonnie 2,496 195 Ted 942 Virgie 2,466 196 Adolph 941 Sophia 2,460 197 Roger 928 Cleo 2,441 198 Jay 926 Jeanette 2,438 199 Roscoe 916 Nell 2,436 200 Juan 912 Eliza 2,397
------------------------------------------------------------------------------------------------------
-------------------------------------babynames2000s.txt------------------------------------------
Males Females Rank Name Number Name Number 1 Jacob 273,690 Emily 223,612 2 Michael 250,420 Madison 193,081 3 Joshua 231,808 Emma 181,174 4 Matthew 221,443 Olivia 155,951 5 Daniel 203,602 Hannah 155,626 6 Christopher 203,184 Abigail 150,814 7 Andrew 202,363 Isabella 149,436 8 Ethan 201,701 Samantha 134,216 9 Joseph 194,583 Elizabeth 133,305 10 William 194,237 Ashley 132,988 11 Anthony 191,742 Alexis 130,712 12 David 179,703 Sarah 124,273 13 Alexander 178,679 Sophia 119,166 14 Nicholas 177,512 Alyssa 114,402 15 Ryan 173,147 Grace 110,645 16 Tyler 165,465 Ava 104,485 17 James 162,978 Taylor 100,930 18 John 160,816 Brianna 99,704 19 Jonathan 144,690 Lauren 97,122 20 Noah 143,348 Chloe 96,410 21 Brandon 142,899 Natalie 95,028 22 Christian 142,285 Kayla 94,292 23 Dylan 140,032 Jessica 90,595 24 Samuel 138,360 Anna 90,125 25 Benjamin 137,151 Victoria 84,882 26 Nathan 134,738 Mia 83,451 27 Zachary 134,691 Hailey 81,921 28 Logan 133,943 Sydney 76,411 29 Justin 122,904 Jasmine 75,983 30 Gabriel 119,711 Julia 70,840 31 Jose 115,660 Morgan 70,729 32 Austin 112,691 Destiny 69,704 33 Kevin 111,003 Rachel 68,215 34 Elijah 110,272 Ella 67,429 35 Caleb 109,980 Kaitlyn 66,874 36 Robert 106,524 Megan 66,800 37 Thomas 102,033 Katherine 65,319 38 Jordan 101,059 Savannah 64,677 39 Cameron 95,822 Jennifer 63,472 40 Jack 95,472 Alexandra 61,216 41 Hunter 94,787 Allison 59,943 42 Jackson 94,441 Haley 57,002 43 Angel 94,249 Maria 56,924 44 Isaiah 92,637 Kaylee 56,372 45 Evan 92,102 Lily 56,146 46 Isaac 90,633 Makayla 54,936 47 Luke 90,442 Brooke 54,652 48 Mason 90,433 Nicole 54,528 49 Jason 88,482 Mackenzie 54,518 50 Jayden 88,473 Addison 51,357 51 Gavin 88,397 Stephanie 49,927 52 Aaron 86,854 Lillian 49,342 53 Connor 85,946 Andrea 49,150 54 Aiden 83,477 Zoe 48,723 55 Aidan 76,465 Faith 48,709 56 Kyle 76,112 Kimberly 48,461 57 Juan 75,805 Madeline 48,263 58 Charles 75,287 Alexa 48,092 59 Luis 74,281 Katelyn 47,799 60 Adam 70,946 Gabriella 47,342 61 Lucas 70,930 Gabrielle 46,989 62 Brian 69,725 Trinity 46,828 63 Eric 69,434 Amanda 46,533 64 Adrian 66,065 Kylie 46,407 65 Nathaniel 64,201 Mary 46,038 66 Sean 64,093 Paige 45,543 67 Alex 63,728 Riley 45,501 68 Carlos 63,133 Leah 45,364 69 Ian 61,897 Jenna 45,279 70 Bryan 61,896 Sara 43,982 71 Owen 61,844 Rebecca 43,599 72 Jesus 61,275 Michelle 43,496 73 Landon 61,072 Sofia 43,350 74 Julian 60,336 Vanessa 43,192 75 Chase 57,132 Jordan 43,150 76 Cole 56,825 Angelina 42,763 77 Diego 56,008 Caroline 41,823 78 Jeremiah 55,580 Avery 41,681 79 Steven 53,838 Audrey 41,494 80 Sebastian 53,822 Evelyn 40,704 81 Xavier 52,417 Maya 40,006 82 Timothy 52,385 Claire 38,995 83 Carter 52,295 Autumn 38,482 84 Wyatt 51,319 Jocelyn 38,363 85 Brayden 50,330 Ariana 37,965 86 Blake 50,069 Nevaeh 37,850 87 Hayden 50,012 Arianna 37,797 88 Devin 49,372 Jada 37,045 89 Cody 48,832 Bailey 36,846 90 Richard 48,538 Brooklyn 36,808 91 Seth 48,129 Aaliyah 36,336 92 Dominic 48,072 Amber 36,183 93 Jaden 46,234 Isabel 36,015 94 Antonio 46,186 Mariah 35,636 95 Miguel 46,057 Danielle 35,596 96 Liam 44,912 Melanie 35,208 97 Patrick 44,757 Sierra 34,496 98 Carson 44,622 Erin 33,351 99 Jesse 43,326 Molly 33,252 100 Tristan 43,261 Amelia 33,245 101 Alejandro 43,088 Isabelle 32,844 102 Henry 42,621 Madelyn 32,604 103 Victor 40,655 Melissa 32,592 104 Trevor 40,029 Jacqueline 32,103 105 Bryce 39,863 Marissa 32,047 106 Jake 39,812 Shelby 31,285 107 Riley 39,591 Angela 31,277 108 Colin 39,115 Leslie 31,042 109 Jared 37,995 Katie 30,406 110 Jeremy 37,455 Jade 30,265 111 Mark 37,204 Catherine 29,671 112 Caden 36,711 Diana 29,531 113 Garrett 36,214 Aubrey 29,511 114 Parker 35,709 Mya 28,767 115 Marcus 35,617 Amy 28,739 116 Vincent 35,251 Briana 28,702 117 Kaleb 34,728 Sophie 28,668 118 Kaden 34,602 Gabriela 28,521 119 Brady 34,294 Breanna 27,985 120 Colton 34,225 Gianna 27,840 121 Kenneth 34,050 Kennedy 27,558 122 Joel 33,635 Gracie 27,459 123 Oscar 33,525 Peyton 27,455 124 Josiah 33,179 Adriana 27,388 125 Jorge 33,013 Christina 27,121 126 Cooper 32,425 Courtney 26,962 127 Ashton 32,405 Daniela 26,627 128 Tanner 31,668 Lydia 26,286 129 Eduardo 31,388 Kathryn 26,258 130 Paul 30,884 Valeria 26,198 131 Edward 30,767 Layla 26,181 132 Ivan 30,660 Alexandria 25,898 133 Preston 30,307 Natalia 25,502 134 Maxwell 30,042 Angel 25,402 135 Alan 29,627 Laura 24,957 136 Levi 29,252 Charlotte 24,234 137 Stephen 28,861 Margaret 23,893 138 Grant 28,402 Cheyenne 23,880 139 Nicolas 28,250 Mikayla 23,718 140 Omar 28,145 Miranda 23,715 141 Dakota 28,135 Naomi 23,673 142 Alexis 28,018 Kelsey 23,372 143 George 27,989 Payton 23,364 144 Eli 27,815 Ana 23,170 145 Collin 27,814 Alicia 23,124 146 Spencer 27,431 Jillian 22,809 147 Gage 27,391 Daisy 22,784 148 Max 27,350 Mckenzie 22,544 149 Cristian 27,176 Ashlyn 22,455 150 Ricardo 27,172 Sabrina 22,324 151 Derek 27,004 Caitlin 22,284 152 Micah 26,992 Summer 22,162 153 Brody 26,678 Ruby 21,995 154 Francisco 26,492 Rylee 21,939 155 Nolan 26,363 Valerie 21,939 156 Ayden 26,273 Skylar 21,864 157 Dalton 26,162 Lindsey 21,632 158 Shane 26,103 Kelly 21,609 159 Peter 26,099 Genesis 21,422 160 Damian 26,006 Zoey 21,371 161 Jeffrey 25,900 Eva 21,330 162 Brendan 25,827 Sadie 21,283 163 Travis 25,713 Alexia 21,218 164 Fernando 25,137 Cassidy 21,162 165 Peyton 24,949 Kylee 21,148 166 Conner 24,907 Kendall 21,020 167 Andres 24,755 Jordyn 20,984 168 Javier 24,613 Kate 20,759 169 Giovanni 24,209 Jayla 20,728 170 Shawn 24,157 Karen 20,591 171 Braden 24,062 Tiffany 20,168 172 Jonah 23,683 Cassandra 20,121 173 Bradley 23,599 Juliana 20,055 174 Cesar 23,587 Reagan 19,967 175 Emmanuel 23,520 Caitlyn 19,771 176 Manuel 23,425 Giselle 19,711 177 Edgar 22,575 Serenity 19,590 178 Mario 22,404 Alondra 19,490 179 Erik 22,399 Lucy 19,366 180 Edwin 22,046 Bianca 18,904 181 Johnathan 21,885 Kiara 18,899 182 Devon 21,604 Crystal 18,884 183 Erick 21,419 Erica 18,851 184 Wesley 21,058 Angelica 18,675 185 Oliver 20,914 Hope 18,659 186 Trenton 20,881 Chelsea 18,010 187 Hector 20,861 Alana 17,912 188 Malachi 20,739 Liliana 17,601 189 Jalen 20,441 Brittany 17,554 190 Raymond 20,361 Camila 17,548 191 Gregory 20,051 Makenzie 17,463 192 Abraham 19,812 Lilly 17,240 193 Elias 19,605 Veronica 17,220 194 Leonardo 19,473 Abby 17,204 195 Sergio 19,433 Jazmin 17,190 196 Donovan 19,309 Adrianna 17,164 197 Colby 19,173 Delaney 17,074 198 Marco 19,106 Karina 17,074 199 Bryson 19,047 Ellie 17,016 200 Martin 18,738 Jasmin 16,896
------------------------------------------------------------------------------------------------------
Here is the file format
Do not use try / catch here. Just declare that the method throws an exception
For full points, design the program so you only read each file one time.
Males Females Rank Name Numb er Name Numb John 84,591 Mary 161, 508 William 69, 321 Helen 69, 429 James 62, 170 Margaret 57, 921 George 43, 589 Anna. 54, 918 Charles 36, 186 Ruth 51, 011
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started