CMPS 134   Fall 2022
Programming Assignment #1: Hole at the Bottom of the Sea
Due Time: 11:59:59pm, Wednesday, Sept. 14

Requirements

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.


Submission of Program

To submit your program, log into the Student File Submission/Retrieval Utility (see link near the top of course web page) and then click on the link to the "prog1_dir" folder. In the text box, enter a title (e.g., "Hole in Sea"), then click on one of the "Browse" buttons, after which you can browse within your computer's secondary storage to find the file that you want to submit, which is the file containing your HoleInSea Java source code. Its name must be HoleInSea.java. (Do not submit the associated .class file.) After you click on the "SUBMIT FORM" button, you should get a message confirming that your file was submitted. You can then click on the large "Continue" link at the top right of the page, which should take you back to the page from which you made the submission. Above the "Form to Submit Message ..." there should be a table that lists any files that you have submitted to the prog1_dir folder.

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.


The Lyrics

Lyrics of "There's a Hole in the Bottom of the Sea"
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