In the world below, the row of skeletons (Graveyard folder on the web gallery) are guarding the
gate. Every so often in this world, the row of skeletons is to reverse order. This project is to
animate the skeleton chain reversal using structural recursion. The storyboard goes something
like the following:
If the row of Skeletons is not yet reversed is more than one then
Reverse the row of Skeletons starting with the 2nd Skeleton (by
recursively calling Reverse
Move the Head Skeleton to the end of the list
The base case is when there is just one Skeleton in the row (that has not yet been reversed). Of
course, a row of 1 Skeleton is already reversed!
The recursive case (for n Skeletons, where n is larger than 1) says to first reverse the last n-1
Skeletons, and then move the first Skeleton to the end of the list.
Implement the Skeleton reversal storyboard given above.Attachments
Attached is a program for Chapter 8. Notes are included within the program to help. Program was developed using 2.4.2 which will work with 2.2.Image below is the program received.All purchases made through Cramshark are final and there are no refunds. Thank you.