Hi I am having problems creating code for a particular part of my class project.
In a java program all player information is to be stored in class called club. The club class must contain methods to register and remove players. The registration method consists of the club addding a unique registration number( integer) to an unregistered player ( use static field ) It should also contain a method to retrieve the players details given the ID.
Below is my attempt but I am a bit confused
public class Club
{
private static int IdOfPlayer=0;
private ArrayList<String> arrList = new ArrayList<String>();
private int removePlayer(int Id)
{
arrList.remove(Id);
}
private Player AddPlayer(Player player)
{
arrList.add(Player);
IdOfPlayer++;
}
}