Question: Please write a program in Java. The program should begin by reading a text file and using that information to create a two-dimensional array. Following

Please write a program in Java. The program should begin by reading a text file and using that information to create a two-dimensional array. Following this, the program should take those items from the file and split them by tokenizing them with a comma and a space(", "). The program will present information regarding the participants of a marathon which will include their first names, last names, and their age. In order to do this, create three methods(firstName, lastName, and age) which will each print only the required column in the array. Finally, the program should ask the user "what information are you looking for?". If the user types firstName, it will print all the first names. Similarly, using the .equals tool, develop the program in a way that it will ask the user to "provide the first name of a participant" in order to provide its information. Please make it as easy/simple as possible to understand.

Example:

Program output: What information are you looking for?

User input: firstName

< Michael, Elias, Alex >

-------------------------

Program output: Please provide the first name of a participant

User input: Elias

---------

text file:

Michael Clark 17

Elias Estrada 24

Alex Flores 28

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!