You are probably familiar with "cumulative" songs, which are ones having lyrics in which each verse (following the first) augments the previous one in some respect. Perhaps the best known of these is The Twelve Days of Christmas.
For this assignment, you are to develop a Java application that produces as output the lyrics of an abbreviated version of the cumulative children's song There's a Hole at the Bottom of the Sea. The lyrics are shown at the end of this document. Provided to you is a very poor solution in which the main() method simply prints every line of the song, one after the other.
Employing the technique of procedural decomposition (as covered in Chapter 1 of the Reges & Stepp textbook), you should "refactor" the given program to improve its structure and to greatly reduce the amount of redundancy in its code. (For an analogy, recall from lecture how the DrawFigures1 program was transformed into DrawFigures2 and then DrawFigures3. Links to all three are on the course web page.) A goal to aim for is to make the program such that few, if any, literal strings appear more than once.
Note that you can submit more than one time to the same folder. Hence, if, after submitting, you improve your program (e.g., by fixing logic errors or by enhancing your comments), you should submit the newer version. Do not use a new file name every time you submit. Rather, use the same name each time. Any previously submitted file having the same name will be renamed automatically.
The program that was provided to you (see link above) includes a comment describing the purpose/behavior of the program; a comment identifying the course, semester, and assignment number; and comments intended to identify the program's author (you!) and those who helped you to develop the program. Also included is a comment intended for you to describe any known deficiencies of your program. Consider this to be a template that you are expected to follow in all subsequent assignments.
There's a hole at the bottom of the sea There's a hole at the bottom of the sea There's a hole There's a hole There's a hole at the bottom of the sea There's a log in the hole at the bottom of the sea There's a log in the hole at the bottom of the sea There's a log There's a log There's a log in the hole at the bottom of the sea There's a bump on the log in the hole at the bottom of the sea There's a bump on the log in the hole at the bottom of the sea There's a bump There's a bump There's a bump on the log in the hole at the bottom of the sea There's a frog on the bump on the log in the hole at the bottom of the sea There's a frog on the bump on the log in the hole at the bottom of the sea There's a frog There's a frog There's a frog on the bump on the log in the hole at the bottom of the sea There's a tail on the frog on the bump on the log in the hole at the bottom of the sea There's a tail on the frog on the bump on the log in the hole at the bottom of the sea There's a tail There's a tail There's a tail on the frog on the bump on the log in the hole at the bottom of the sea |