Modify PlayerTest.java so that it satisfies the following.
Add a method named getPlayerData. The method has a single parameter named fileName that holds a String.
The method attempts to create a Scanner that can read the file whose name is in fileName.
If successful, the method changes the Scanner’s delimiters by calling useDelimiter() so that it parses tokens separated by commas and new-line characters.
The method then reads the integer on the first line of the file and allocates an array of Player objects whose length is equal to value read from the file.
For each subsequent line of the file, the method reads the player’s username and level from the file, creates an instance of the Player class, and stores the reference to the new instance in the array of Player objects.
When finished reading the file, the method returns the array of Player objects.
In main, get the data in players.data by calling getPlayerData(). Print to the screen the contents of the array that is returned by getPlayerData() using printPlayer().
You know the drill.