Question: Problem Description: The Esports program would eventually like to make a public version of their database for displaying the organizations, players, and teams with various
Problem Description:
The Esports program would eventually like to make a public version of their database for displaying the
organizations, players, and teams with various statistics. They believe being able to sort these entities
based on their statistics would be a useful and attractive feature for their database. They would like you
to prototype adding this functionality to their app.
The new statistics they would like to add include the number of wins and losses, the rank, and the
number of years active. These statistics apply to organizations, players, and teams. The statistics data
are given as a new part of an organizations data file.
The new format of the data file is as follows:
organizationName, W;L;R;Y
teamName W;L;R;Y teamGame teamNumberOfPlayers
teamPlayerName teamPlayerAge W;L;R;Y
teamPlayerName teamPlayerAge W;L;R;Y
teamPlayerNName teamPlayerNAge W;L;R;Y
where for each entry:
W is a whole number representing the number of wins.
L is a whole number representing the number of losses.
R is a whole number representing the rank.
Y is a whole number representing the number of years active.
Note the comma separating the organization name from its statistics.
Task Description:
Write a Java program to prototype sorting organizations, players, and teams by their statistics.
Read the Organization, Player, and Team data from the given input files into lists for each
class.
For each of Organization, Team, and Player classes choose one of the following to sort by:
Winloss ratio
Rank
Number of years active
For each class sort by the chosen criteria using each of the following algorithms based on the
natural ordering:
Bubble sort
Insertion sort
Merge sort
Record the runtime duration of each algorithm and output the durations to the screen.
Write the sorted data to separate files orgssorted.txt teamssorted.txt and
playerssorted.txt
Implementation Details:
You must implement the sorting algorithms yourself and cannot use any existing library sort methods.
Recall that Team previously had wins and losses as fields, and Player had rank as a field. These should be
removed as fields for these classes and added to a new Statistics class. Each class will have a new field
for the new Statistics class.
It may be possible for teams to have null Players depending on the implementation of Team. Null
players should be removed from the list before performing any sorting.
System.nanoTime is a method which returns the time of the most precise available system timer in
nanoseconds. This can be used to time your sorting algorithms.
Tasks and are not intended to be part of the actual Esports league app. So you will not need to
include the code for the menu or read and save values to output files. This program will simply read all
the data into appropriate data structures, perform the required sorts and timings, then write the sorted
data to the respective output files.
There are files to search from: AMD.txt sekai.txt Olddominionuniversity.txt and barton.txt This is the format:
Barton, ;;;
Trials ;;; Destiny
Saint ;;;
Osiris ;;;
Salad ;;;
Eldens ;;; ER
Bears ;;; Snooker
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
