A number n of Pokemon Objects you have saved in a text file should be read into an arrays of objects. This number should be entered by the user –validate this entry-.
Arrange those n Pokemons in a line from the largest name (in lexicographic order) at the end to smallest at the front, in order to transfer them from this location A to location C Using location C as an intermediate of temporary location while obeying two simple rules:
1. Only one Pokemon can be moved at a time.
2. A larger Pokemon can never go in front of a smaller one
Write a recursive Java code that will print each move made in transferring the n (arranged) Pokemons from location A to C, and the number of moves needed for the transfer.
Do not use your own stacks.
Make sure your algorithm will use the smallest number of moves.