The Tower of Hanoi puzzle is a popular test whereby we attempt to move the entire stack of disks from the first to the last rod, obeying the following simple rules:
1. Only one disk may be moved at a time.
2. Each move consists of taking the upper disk from one of the stacks and placing it on top of another stack or on an empty rod.
3. No disk may be placed on top of a disk which is smaller than it.
Question: Implement a Java software implementation of a version of this task. Write java code that allows the user will input the following parameters:
1. Number of disks (4-6).
2. Number of rods including the starting and finishing rod. (3-5)
It will output step-by-step details of the disk transfers involved. Example below: