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
teamPlayer1Name teamPlayer1Age W;L;R;Y
teamPlayer2Name teamPlayer2Age 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.
1. Read the Organization, Player, and Team data from the given input files into 3 lists for each
class.
2. For each of Organization, Team, and Player classes choose one of the following to sort by:
- Win/loss ratio
- Rank
- Number of years active
3. 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
4. Record the runtime duration of each algorithm and output the durations to the screen.
5. Write the sorted data to separate files (orgs_sorted.txt, teams_sorted.txt, and
players_sorted.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 3,4, and 5 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 4 files to search from: AMD.txt, sekai.txt, Olddominionuniversity.txt, and barton.txt. This is the format:
Barton, 5;4;6;0
Trials 0;5;6;0 Destiny 3
Saint 1005;4;6;0
Osiris 40050;2;6;2
Salad 100010;45;21;5
Eldens 0;0;4;0 ER 1
Bears 0;0;0;4 Snooker 2

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 Programming Questions!