Question: From: Java Programming: From Problem Analysis to Program Design, 5th ed. Ch. 9, page 636, Problem Exercise 12: Jason, Samantha, Ravi, Sheila, and Ankit are

From: Java Programming: From Problem Analysis to Program Design, 5th ed.

Ch. 9, page 636, Problem Exercise 12:

Jason, Samantha, Ravi, Sheila, and Ankit are preparing for an upcoming marathon. Each day of the week they run certain miles and write them into a notebook. At the end of the week, they would like to know the number of miles run each day, the total miles for the week, and average miles run each day. Write a program to help them analyze their data. Your program must contain parallel arrays: An array to store the names of the runners and a two-dimensional array of 5 rows and 7 columns to store the number of miles run by each runner each day. Furthermore, your program must contain at least the following methods: a method to read and store the runners name and the number of miles run each day; a method to find the total miles run by each runner and the average number of miles run each day; and a method to output the results. (You may assume that the input data is stored in a file and each line of data is in the following form:

runnerName milesDay1 milesDay2 milesDay3 milesDay4 milesDay5 milesDay6 milesDay7.)

I need this as a Java program.

data.txt file contains

Jason 10 15 20 25 18 20 26 Samantha 15 18 29 16 26 20 23 Ravi 20 26 18 29 10 12 20 Sheila 17 20 15 26 18 25 12 Ankit 16 8 28 20 11 25 21

Thank you!

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!