Question: C++ help please show program working and each file with a label please. Thank you! Mandatory Instructions Develop a C?object oriented solution to the Towers
C++ help please show program working and each file with a label please.





Thank you!
Mandatory Instructions Develop a C?object oriented solution to the Towers of Hanoi puzzle. Your solution will involve designing two classes one to represent individual Disk and another to represent the TowersOfHanoi game. TowersOfHanoi class will implement the game with three linked lists representing disks on each of the tower's pegs... Nodes of the linked lists will be dynamically instantiated objects of the Disk class. There is NO inheritance relationship between these two classes. Disk Class Place the class definition in prog8disk h Implement all of this class' functions as Include only the necessary e files in the pro file. This class will define a single disk that is used in the puzzle. The disk will have a certain weight Qarger disks will have larger weight, smaller disks will have smaller weight). If the puzzle has 4 disks, we will assign largest disk weight 4, then next largest 3, etc. down to the smallest disk which will have weight 1. Use an appropriate private data member to represent this disk weight. Also provide an accessor function to return the disk weight. Since objects of this class will be nodes in a linked list, add another private data member that will be able to "point to the next Disk node. Provide mutator and accessor functions to get/set this pointer data member. Provide a default constructor that will set all data members to values that make sense such as 0 and nullptr Provide an overloaded constructor that will accept ONLY the weight as a parameter setting data member to the given weight and pointer to nullptr Provide a destructor for the class. It will be empty
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
