Question
Given the text file TitanicNames.txt, write a simple Java program to do the following: - count how many passenger names are in the file -
Given the text file TitanicNames.txt, write a simple Java program to do the following:
- count how many passenger names are in the file
- find the longest passenger name in the file
- find whether there were any passengers named Jones on the Titanic
- write out, to the screen (console), all of the above information
Here are the contents of the txt file:
Allison H Allison H Allison L Allison T Anderson Harry Anews Cornelia Anews Thomas Appleton E Artagaveytia Ramon Astor J Astor J Aubert N Barkworth A Baumann J Baxter James Baxter Quigg Beattie T Beckwith R Beckwith R Behr K Bishop D Bishop D Bjornstrom H Blackwell Stephen Blank Henry Bonnell Caroline Bonnell Lily Borebank J Bowen P Bowerman Elsie Brady John Brandeis E Brayton George Brewe Arthur Brown J Brown J Bucknell W Butt Archibald Calderhead E Candee Churchill Cardoza J Cardoza T Carlson Frank Carran F Carran J Carter William Carter William Carter Lucile Carter William Case Howard Cassebeer H Cavendish TW Cavendish T Chaffee Herbert Chaffee Herbert Chambers N Chambers N Cherry Gladys Chevre Paul Chibnafl E Chisholm Robert Clark Walter Clark Walter Clifford George Colley E Compton A Compton S Compton A Cornell R Crafton John Crosby Edward Crosby Edward Crosby Harriet Cummings John Cummings John Daly P Daniel Robert Davidson Thornton Davidson Thornton de Villiers B Dick A Dick A Dodge Washington Dodge Washington Dodge Washington Douglas F Douglas W Douglas W Dulles William Earnshew Boulton Enes Caroline Eustis E Evans E Flegenheim A Flynn J Foreman B Fortune Mark Fortune Mark Fortune Ethel Fortune Alice Fortune Mabel Fortune Charles Franklin T Frauenthal T Frauenthal Henry Frauenthal Henry Frolicher Marguerite Futrelle J Futrelle J Gee Arthur Gibson L Gibson D Giglio Victor Goldenberg S Goldenberg S Goldschmidt George Gordon Cosmo Gordon Lady Gracie Archibald Graham B Graham William Graham Margaret Greenfield L Greenfield W Guggenheim Mr Harder George Harder George Harper Henry Harper Henry Harris Henry Harris Henry Harrison W Haven H Hawksford W Hays Charles Hays Charles Hays Margaret Head Christopher Hilliard Herbert Hipkins W Hippach Ida Hippach Jean Hogeboom John Holverson A Holverson A Hoyt Frederick Hoyt Frederick Holt W Isham A Ismay J Jakob Birnbaum Jones C Julian H Kent Edward Kenyon F Kenyon F Kimball E Kimball E Klaber Herman Lambert-Williams Fletcher Leader F Lewy E Lindstroem J Lines Ernest Lines Mary Lingrey Edward Long Milton Langley Gretchen Loring J Madill Georgette Maguire J Marechal Pierre Marvin D Marvin D McCaffry T McCarthy Timothy McGough J Meyer Edgar Meyer Edgar Millet Frank ahan W ahan W ahan Daisy Moch Pkdtp Moch Phillip Molson H Moore Clarence Natsch Charles Newell A Newell Alice Newell Madeline Newsom Helen Nicholson A Omont F Ostby E Ostby Helen Ovies S Parr M Partner Austin Payne V Pears Thomas Pears Thomas Penasco Victor Penasco Victor Peuchen Arthur Porter Walter Potter Thomas Reuchlin Jonkheer Rheims George Robert Edward Roebling Washington Rolmane C Rood Hugh Rosenbaum Ross J Rothes Countess Rothschild M Rothschild M Rowe Alfred Ryerson Arthur Ryerson Arthur Ryerson Emily Ryerson Susan Ryerson Jack Saalfeld Adolphe Schabert Paul Seward Frederick Shutes E Silverthorne S Silvey William Silvey William Simonius Oberst Sloper William Smart John Smith J Smith R Smith L Smith L Snyder John Snyder John Soloman A Spedden Frederick Spedden Frederick Spedden R Spencer W Spencer W Stahelin Max Stead W Steffanson B Steffanon H Stehli Max Stehli Max Stengel C Stengel C Stewart A Stone George Straus Isidor Straus Isidor Sutton Frederick Swift Frederick Taussig Emil Taussig Emil Taussig Ruth Taylor E Taylor E Thayer J Thayer J Thayer J Thorne G Thorne G Tucker G Uruchurtu M Van der Hoef Wyckoff Walker W Warren F Warren F Weir J White Percival White Richard White J Wick George Wick George Wick Mary Widener George Widener George Widener Harry Willard Constance Williams Duane Williams R Woolner Hugh Wright George Young Marie Abelson Samson Abelson Hanna Aldworth C Anew Edgar Anew Frank Angle William Angle P Ashby John Baily Percy Baimbridge Chas Balls Ada Banfield Frederick Bateman Robert Beane Edward Beane Ethel Beauchamp H Becker A Beesley Lawrence Bentham Lilian Berriman William Botsford W Bowenur Solomon Bracken Jas Brito Jose Brown Miled Brown S Brown Robert Brown E Bryhl Curt Bryhl Dagmar Buss Kate Butler Reginald Byles nomas Bystrom Karolina Caldwell Albert Caldwell Sylvia Caldwell Alden Cameron Clear Carbines William Carter Ernest Carter Lillian Chapman John Chapman Elizabeth Chapman Charles Christy Alice Christy Juli Clarke Charles Clarke Ada Coleridge R Collander Erik Collett Stuart Collyer Harvey Collyer Charlotte Collyer Marjorie Corbett Irene Corey C Cotterill Harry Davies Charles Davis Agnes Davis John Davis Mary Deacon Percy del Carlo Sebastian del Carlo Denbou Herbert Dibden William Doling Ada Doling Elsie Downton William Dachstedt Baron Dew James Dew Lulu Dew Marshall Duran Florentina Duran Asimcion Eitemiller G Enander Ingvar Fahlstrom Arne J Faunthorpe Harry Faunthorpe Lizzie Fillbrook Charles Fox Stanley Funk Annie Fynney Jos Gale Harry Gale Shaach Garside Ethel Gaskell Alfred Gavey Lawrence Gilbert William Giles Edgar Giles Fred Giles Ralph Gill John Gillespie William Givard Hans Greenberg Samuel Hale Reginald Hamalainer Anna Harbeck Wm Harper John Harper Nina Harris George Harris Walter Hart Benjamin Hart Esther Hart Eva Herman Alice Herman Jane Herman Kate Herman Samuel Hewlett Mary Hickman Leonard Hickman Lewis Hickman Stanley Hiltunen Martha Hocking George Hocking Elizabeth Hocking Nellie Hocking Samuel Hodges Henry Hoffman Louis Hold Annie Hold Stephen Hood Ambrose Hosono Masabumi Howard Benjamin Howard Ellen Hunt George Ilett Bertha Jacobsohn Amy Jacobsohn Sidney Jarvis John Jefferys Clifford Jefferys Ernest Jenkin Stephen Jervan A Kantor Miriam Kantor Sehua Karnes J Keane Daniel Keane Nora Kelly F Kirkland Charles Kvillner John Lahtinen Anna Lahtinen William Lamb J Lamore Ameliar Laroche Joseph Laroche Juliet Laroche Louise Laroche Simonne Lehman Bertha Leitch Jessie Levy R Leyson Robert Lingan John Louch Charles Louch Alice Mack Mary Malachard Noel Mallet A Mallet C Mallet A Mangiavacchi Emilio Mantvila Joseph Marshall D Marshall Kate Matthews W Maybery Frank McCrae Arthur McCrie James McKane Peter Mellers William Mellinger Elizabeth Meyer August Milling Jacob Mitchell Henry Morawick Ernest Mudd Thomas Myles Thomas Nasser Nicolas Nasser A Nesson Israel Nicholls Joseph Norman Robert Nye Elizabeth Otter Richard Oxenham P Pao Julian Pain Alfred Pallas Emilio Parker Clifford Parrish L Pengelly Frederick Pernot Rene Peruschitz Jos Phillips Robert Phillips Alice Pinsky Rosa Ponesell Martin Portaluppi Emilio Pulbaun Frank Quick Jane Quick Vera Quick Phyllis Reeves David Renouf Peter Renouf Lillie Reynolds E Richard Emile Richards Emily Richards William Richards George Ridsdale Lucy Rogers Harry Rogers Selina Rugg Emily Sedgwick C Sharp Percival Shelley Imanita Silven Lyyli Sincook Maude Sinkkenen Anna Sjostedt Ernest Slayter H Slemen Richard Smith Augustus Smith Marion Sobey Hayden Stanton S Stokes Phillip Swane George Sweet George Toomey Ellen Trant Jessie Tronpiansky Moses Troutt E Tupin M Turpin William Veale James Walcroft Nellie Ware Florence Ware John Ware William Watt Bertha Watt Bessie Webber Susie Weisz Leopold Weisz Matilda Wells Addie Wells J Wells Ralph West E West Ada West Barbara West Constance Wheadon Edward Wheeler Edwin Abbott Eugene Abbott Rosa Abbott Rossmore Abbing Anthony Adams J Aks Filly Aks Leah Alexander William Allen William Allum Owen Badman Emily Barton David Beavan W Billiard A Billiard James Billiard Walter Bing Lee Bowen David Braund Lewis Braund Owen Brocklebank William Cann Erenst Carver A Celotti Francesco Chip Chang Christmann Emil Cohen Gurshon Cook Jacob Corn Harry Coutts Winnie Coutts William Coutts Leslie Coxon Daniel Crease Ernest Cribb John Cribb Alice Dahl Charles Davies Evan Davies Alfred Davies John Davies Joseph Davison Thomas Davison Mary Dean Bertram Dean Hetty Dean Bertran Dean Vera Dennis Samuel Dennis William Derkings Edward Dowdell Elizabeth apkin Jenie Dugemin Joseph Elsbury James Emanuel Ethet Everett Thomas Foo Choong Ford Arthur Ford Margaret Ford D Ford E Ford M Ford Maggie Franklin Charles Garthfirth John Gilinski Leslie Godwin Frederick Goldsmith Frank Goldsmith Emily Goldsmith Frank Goodwin Augusta Goodwin Lillian Goodwin Charles Goodwin William Goodwin Jessie Goodwin Harold Goodwin Sidney Green George Guest Robert Harknett Alice Harmer Abraham Hee Ling Howard May Hyman Abraham Johnston A Johnston B Johnston William Johnston C Johnson A Johnson W Keefe Arthur Kelly James Lam Ali Lam Len Lang Fang Leonard L Lester J Ling Lee Lithman Simon Lobb Cordelia Lobb William Lockyer Edward Lovell John MacKay George Maisner Simon McNamee Eileen McNamee Neal Meanwell Marian Meek Annie Meo Alfonso Miles Frank Moor Beile Moor Meier Moore Leonard Morley William Moutal Rahamin Murdlin Joseph Nancarrow W Niklasen Sander Nosworthy Richard Peacock Alfred Peacodc Treasteall Peacock Treasteall Pearce Ernest Peduzzi Joseph Perkin John Peterson Marius Potchett George Rath Sarah Reed James Reynolds Harold Risien Emma Risien Samuel Robins Alexander Robins Charity Rogers William Rouse Richard Rush Alfred Sadowitz Harry Sage John Sage Annie Sage Stella Sage George Sage Douglas Sage Frederick Sage Dorothy Sage William Sage Ada Sage Constance Sage Thomas Sather Sinon Saundercock W Sawyer Frederick Scrota Maurice Shellard Frederick Shorney Charles Simmons John Slocovski Selman Somerton Francis Spector Woolf Spinner Henry Stanley Amy Stanley E Storey T Sunderland Victor Sutehall Henry Theobald Thomas Thomas Alex Thorneycrolt Florence Thorneycroft Percival Tomlin Ernest Torber Ernest Trembisky Berk Tunquist W Ware Frederick Warren Charles Webber James Wilkes Ellen Willey Edward Williams Harry Williams Leslie Windelov Einar Wiseman Philip Abelseth Karen Abelseth Olaus Abramson August Adahl Mauritz Adolf Humblin Ahlin Johanna Ahmed Ali Alhomaki Ilmari Ali William Anderson Alfreda Anderson Erna Anderson Albert Anderson Anders Anderson Samuel Anderson Sigrid Anderson Thor Anderson Carla Anderson Ingeborg Anderson Ebba Anderson Sigvard Anderson Ellis Anderson Ida Anderson Paul Angheloff Minko Asplund Carl Asplund Charles Aspland Felix Asplund Gustaf Asplund Johan Asplund Lillian Asplund Oscar Asplund Selma Arnold Joseph Arnold Josephine Aronsson Ernest Asim Adola Assam Ali Augustsan Albert Backstrom Karl Backstrom Marie Balkic Cerin Benson John Berglund Ivar Berkeland Hans Bjorklund Ernst Bostandyeff Guentcho Braf Elin Brobek Carl Cacic Grego Cacic Luka Cacic Maria Cacic Manda Calie Peter Carlson Carl Carlsson Julius Carlsson August Coelho Domingos Coleff Fotio Coleff Peyo Cor Bartol Cor Ivan Cor Ludovik Dahl Mauritz Dahlberg Gerda Dakic Branko Danbom Ernest Danbom Gillber Danoff Sigrid Danoff Yoto Dantchoff Khristo Delalic Regyo Denkoff Mito Dimic Jovan Dintcheff Valtcho Dyker Adoff Dyker Elizabeth Ecimovic Joso Edwardsson Gustaf Eklunz Hans Ekstrom Johan Finote Luigi Fischer Eberhard Goldsmith Nathan Goncalves Manoel Gronnestad Daniel Gustafson Alfred Gustafson Anders Gustafson Johan Gustafsson Gideon Haas Aloisia Hadman Oscar Hagland Ingvald Hagland Konrad Hakkurainen Pekko Hakkurainen Elin Hampe Leon Hankonen Eluna Hansen Claus Hansen Janny Hansen Henry Heininen Wendla Hendekevoic Ignaz Henriksson Jenny Hervonen Helga Hervonen Hildwe Hickkinen Laina Hillstrom Hilda Holm John Holten Johan Humblin Adolf Ilieff Ylio Ilmakangas Ida Ilmakangas Pista Ivanoff Konio Jansen Carl Jardin Jose Jensen Carl Jensen Hans Jensen Svenst Jensen Nilho Johannessen Bernt Johannessen Elias Johansen Nils Johanson Oscar Johanson Oscal Johansson Erik Johansson Gustaf Johnson Jakob Johnson Alice Johnson Harold Johnson Eleanora Johnsson Carl Johnsson Malkolm Jonkoff Lazor Jonsson Nielo Jusila Katrina Jusila Mari Jusila Erik Jutel Henrik Kallio Nikolai Kalvig Johannes Karajic Milan Karlson Einar Karlson Nils Kekic Tido Kink Anton Kink Louise Kink Louise Kink Maria Kink Vincenz Klasen Klas Klasen Hilda Klasen Gertrud Laitinen Sofia Laleff Kristo Landegren Aurora Larson Viktor Larsson Bengt Larsson Edvard Lefebre Frances Lefebre Henry Lefebre Ida Lefebre Ida Lefebre Leinonen Antti Lindablom August Lindell Edvard Lindell Elin Lindahl Agda Lindqvist Einar Lulic Nicola Lundahl John Lundin Olga Lundstripm Jan Madsen Fridjof Maenpaa Matti Makinen Kalle Mampe Leon Marinko Dmitri Markoff Marin Melkebuk Philemon Messemacker Guillaume Messemacker Emma Midtsjo Carl Mikanen John Meff Ivan Minkoff Lazar Mirko Dika Mitkoff Mito Moen Sigurd Mona Mae Moss Albert Mulder Theo Myhrman Oliver Naidenoff Penko Nankoff Minko Nedeco Petroff Nenkoff Christo Nieminen Manta Nilsson August Nilson Berta Nilson Helmina Nirva Isak Nyoven Johan Nyston Anna Odahl Martin Orman Velin Olsen Arthur Olsen Carl Olsen Henry Olsen Ole Olson Elon Olsson John Olsson Elida Oreskovic Luka Oreskovic Maria Oreskovic Jeko Osman Mara Pacruic Mate Pacruic Tome Panula Eino Panula Ernesti Panula Juho Panula Maria Panula Sanni Panula Urhu Panula William Pasic Jakob Pentcho Petroff Paulsson Alma Paulsson Gosta Paulsson Paul Paulsson Stina Paulsson Torborg Pavlovic Stefo Pekonemi E Pelsmaker Alfons Peltomaki Nikolai Person Ernest Peterson Johan Peterson Ellen Petranec Matilda Petterson Olaf Plotcharsky Vasil Radeff Alexander Rintamaki Matti Rosblom Helene Rosblom Salfi Rosblom Viktor Rummstvedt Kristian Salander Carl Saljilsvik Anna Salonen Werner Sandman Johan Sandstrom Agnes Sandstrom Beatrice Sandstrom Margretha Sdycoff Todor Sheerlinck Jean Sihvola Antti Sivic Husen Sjoblom Anna Skoog Anna Skoog Carl Skoog Harald Skoog Mabel Skoog Margret Skoog William Slabenoff Petco Smiljanic Mile Sohole Peter Solvang Lena Sop Jules Staneff Ivan Stoytcho Mihoff Stoyehoff Ilia Strandberg Ida Stranden Jules Strilic Ivan Strom Selma Svensen Olaf Svensson Johan Svensson Coverin Syntakoff Stanko Tikkanen Juho Todoroff Lalio Tonglin Gunner Turcin Stefan Turgo Anna Twekula Hedwig Uzelas Jovo Waelens Achille Van Impe Catharine Van Impe Jacob Van Impe Rosalie Van der Planke Augusta Van der Planke Emilie Van der Planke Jules Van der Planke Leon Van der Steen Leo Van de Velde Joseph Van de Walle Nestor Vereruysse Victor Vook Janko Wende Olof Wennerstrom August Wenzel Zinhart Vestrom Huld Widegrin Charles Wiklund Karl Wiklund Jacob Wirz Albert Wittenrongel Camille Zievens Renee Zimmermann Leo Assaf Marian Attala Malake Baclini Latila Baclini Maria Baclini Eugene Baclini Helene Badt Mohamed Banoura Ayout Barbara Catherine Barbara Saude Betros Tannous Boulos Hanna Boulos Sultani Boulos Nourelain Boulos Akar Banous Elias Caram Joseph Caram Maria Shabini Georges Chehab Emir Chronopoulos Apostolos Cbronopoulos Demetrios Dibo Elias Eazenovie Josip Elias Joseph Elias Joseph Fabini Leeni Fat-ma Mustmani Gerios Assaf Gerios Youssef Gerios Youssef Gheorgheff Stanio Hanna Mansour Jean Nassr Saade Johann Markim Joseph Mary Karun Franz Karun Anna Kassan M Kassem Fared Kassein Hassef Kalil Betros Khalil Zahie Kraeff Thodor Lemberopoulos Peter Malinoff Nicola Meme Hanna Monbarek Hanna Moncarek Omine Moncarek Gonios Moncarek Halim Moussa Mantoura Naked Said Naked Waika Naked Maria Nasr Mustafa Nichan Krikorian Nicola Jamila Nicola Elias Novel Mansouer Orsen ayanian Ortin Zakarian Peter Catherine Peter Mike Peter Anna Rafoul Baccos Raibid Razi Saad Amin Saad Khalil Samaan Hanna Samaan Elias Samaan Youssef Sarkis Mardirosian Sarkis Lahowd Seman Betros Shedid Daher Sleiman Attalla Stankovic Jovan Tannous Thomas Tannous Daler Thomas Charles P Thomas Tamin Thomas Assad Thomas John Tonfik Nahli Torfa Assad Useher Vagil Adele Vartunian David Vassilios Catavelas Wazli Yousif Weller Abi Yalsevae Ivan Yazbeck Antoni Yazbeck Salini Youss ef Brahim Youssef Hanne Youssef Maria Youssef Georges Zabour Tamini Zabour Hileni Zakarian Maprieder Barry Julia Bourke Catherine Bourke John Bradley Bridget Buckley Daniel Buckley Katherine Burke Jeremiak Burke Mary Burns Mary Canavan Mary Carr Ellen Car Jeannie Chartens David Cannavan Pat Colbert Patrick Conlin Thos Connaghton Michel Connors Pat Conolly Kate Conolly Kate Daly Marcella Daly Eugene Devanoy Margaret Dewan Frank Dooley Patrick Doyle Elin Driscoll Bridget Emmeth Thomas Farrell James Foley Joseph Foley William Flynn James Flynn John Fox Patrick Gallagher Martin Gilnegh Katie Glynn Mary Hagardon Kate Hagarty Nora Hart Henry Healy Nora Horgan John Hemming Norah Henery Delia Jenymin Annie Kelly James Kelly Annie Kelly Mary Kerane Andy Kennedy John Kilgannon Thomas Kiernan John Kiernan Phillip Lane Patrick Lemom Denis Lemon Mary Linehan Michel Madigan Maggie Mahon Delia Mannion Margareth Mangan Mary McCarthy Katie McCoy Agnes McCoy Alice McCoy Bernard McCormack Thomas McDermott Delia McElroy Michel McGovern Mary McGowan Katherine McGowan Annie McMahon Martin Mechan John Meeklave Ellie Moran James Moran Bertha Morgan Daniel Morrow Thomas Mullens Katie Mulvihill Bertha Murphy Norah Murphy Mary Murphy Kate Naughton Hannah Nemagh Robert O'Brien Denis O'Brien Thomas O'Brien Hannah O'Connell Pat O'Connor Maurice O'Connor Pat O'Donaghue Bert O'Dwyer Nellie O'Keefe Pat OLeary Norah O'Neill Bridget O'Sullivan Bridget Peters Katie Rice Margaret Rice Albert Rice George Rice Eric Rice Arthur Rice Eugene Riordan Hannah Ryan Patrick Ryan Edw Sadlier Matt Scanlan James Shaughnesay Pat Shine Ellen Smyth Julian Tobin Roger
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