<pre lang="cs">public void addManager(Manager m){
int i = 0;
while (managers[i] != null)
i++;
managers[i] = m;
if (i == 5)
System.out.println("Erreur ,le secretaire est trop occupé (MAX5)");
}
So what i have done is that:
1. first i deleted from method parameters the INT I value
public void addManager(Manager m) ,beacause i don t want it as a "giving value" but as a counter in the method.
2.I decided to use WHILE loop to base from that the array is empty from the beginning.
3.When is 5 throw message of array gap is max.