I have this Tower of Hanoi program in java and I'm able to get it to work, but I can't for the life of me figure out how to get it to show how it's going from, for example, "Disk 1 From TowerA to TowerC", "Disk 2 From TowerA to TowerB", etc..
Here's my code:
Is there a way to add the "Disk # From (TowerA, TowerB, or TowerC) to (TowerA, TowerB, or TowerC)"? Any help would be much appreciated.
try this
and LinkStack class look like
output :