Exercise – 4: Working with files
In this exercise, you will implement the marathon exercise usinginput and output files. Assume that the names and times are givenin a file. A sample file is given in the atachment: “marathon.txt”.Read the file and fill out the names and times array. Write methodto find the best and second best runners. You are supposed to writethe names and times of the best and second best runners in anoutput text file, called: “marathon-result.txt”.
Name Time(minutes)
Elena 341
Thomas 273
Hamilton 278
Suzie 329
Phil 445
Matt 402
Alex 388
Emma 275
John 243
James 334
Jane 412
Emily 393
Expert Answer
An answer will be send to you shortly. . . . .