So I have to create a pokedex program that displays the number of pokemon in the file while it also displays all the pokemon in the file. I added the file and everything in my other class here is the link to my GitHub which shows the other classes and the code for them. My main problem is writing the For Loop on displaying the count and result for all the pokemon. Here is what I have so far.
public class Pokedex implements PokedexInterface {
private Pokemon pokedex[] = new Pokemon[1000];
private int pokemonCount = 0;
@Override
public String toString()
{
// loop through pokedex
// add each item of the pokedex to the output variable
String output = new String();
for(Pokemon count : pokedex)
{
output += count;
}
return output;
}
public void addPokemon(Pokemon pokemon) {
}
}
Again here is the link to the whole program