Menu

[Solved]1 Program Description Write Program Displays Statistics Sfsu Student Participated Sf Marat Q37272085

1. Program Description:

Write a program that displays the statistics of some SFSUstudent who participated in the SF Marathon in 2017 and in2018.

Details

Some students from SFSU participated in the SF Marathon twoyears (2017 and 2018) in a row. Their details are as follows:

Name

Time in minutes 2017

Time in minutes 2018

Emily

357

341

Simon

299

307

Paulo

432

328

Aaron

326

283

Kate

275

274

Cindy

450

359

Ryan

265

256

James

343

343

Michael

264

269

Sara

308

308

Joseph

242

249

Juan

377

340

Brad

273

238

Find the first, second and third fastest runners in both yearsand print out their names and time (in minutes).

Find the students who improved their time from 2017 to 2018 andprint out their names and the number of minutes they improvedby.

Print out the name of the student who improved the most as a“tenacious runner”.

Sample output

The three fastest runners in 2017 and their time inminutes are: Joseph : 242
Michael: 264
Ryan: 265

The three fastest runners in 2018 and their time inminutes are: Brad : 238
Joseph: 249
Ryan: 256

The list of students who improved their time from 2017to 2018 are: Emily : 16 minutes
Paulo: 104 minutes
….etc

Paulo is the tenacious runner.

2. Directions:

Write :

1.

2.

3.

A method called ​fastestRunner​ that takes anarray of integers and and an array of Strings, and prints out thenames and times( in minutes) of the first ,second and third runnersin each year. This method also returns the index corresponding tothe person with the lowest time(the first runner)

( This method should be called from the mainmethod).

A second method called ​swapFirst​ that putsthe name of the fastest runner at the beginning of the array.Thismethod takes an array of Strings and an integer as its input andreturns the modified array.

( This method should be called from the fatestRunnermethod.)​A method called ​compareTimes​that compares the time in minutes of both

years and returns an array with the record of the minutesimproved or hindered back. This method takes two arrays and returnsan array.

( This method should be called from the mainmethod.)

3. TIPS:

Here is a program skeleton to get started:class​ SFMarathon{

public static void​ main (String[] arguments) {

String[] studentNames = { ​”Emily”, “Simon”, “Paulo”, “Aaron”,”Kate”, “Cindy”, “Ryan”, “James”, “Michael”, “Sara”, “Joseph”,”Juan”, “Brad”​ };
Int​[] times2017= { ​357, 299, 432, 326, 275, 450, 265, 343, 264,308, 242, 377, 273​};
//continue here

//Write your code to call the method here }// end of main

// Write your methods here } // end of class

4. Submission
Submit your ​java file​ via iLearn not later than ​April25, 2019 at 11:59pm​, for a full credit.

Late submission:
Students are allowed to make late submission within 48 hours of theassignment’s deadline, for 75% of the credits. Submissions laterthan that will not be accepted, and it will result in a zero forthat assignment.

both the array of integers will be input to fastestRunnermethod

what will SwapFirst method will be used to put the correspondingnames in the corresponding element as the element the time iscoordinated with. so when the numbers are switched in the array to,the names must be switched to the corresponding element in theother array.

Expert Answer


Answer to 1. Program Description: Write a program that displays the statistics of some SFSU student who participated in the SF Mar… . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *