Java 4.7.8 how many players in the game?
i keep getting the same 3 errors: "grader.java: line 24: constructor player in class player cannot be applied to given types;"
it does work when i run it though.
the check code finds the errors and won't let me turn it in.
public class player
{
private string name;
private int level;
public static int totalplayers = 0;
public static int maxplayers = 10;
public player(string username)
{
name = username;
totalplayers++;
}
public static int totalplayers()
{
return totalplayers;
}
public static boolean gamefull()
{
return totalplayers >= maxplayers;
}
public string tostring()
{
return "online: " + name;
}
}