Cumulative Song

This programming assignment tests your understanding of static methods and println statements and will give you familiarity with how assignments will be completed and submitted in this class. You will write a Java class called Song in a file named Song.java. (Use exactly this file name, including identical capitalization.)

A cumulative song is one in which each verse builds upon previous verses. For this assignment, you will write a program that outputs the following cumulative song created by UW instructors:

Hey homies, my code is gonna rock this place
With a method named main and a curly brace
I put a semicolon at the end of each line
You haters never seen code that looked so fine

Hey homies, my code is gonna rock this place
With a method named main and a curly brace
jGrasp loves my code, no need to debug
I can rap in Java until it unplug
I put a semicolon at the end of each line
You haters never seen code that looked so fine

Hey homies, my code is gonna rock this place
With a method named main and a curly brace
The first time I try, my code compiles
Lost a point for style cause my comments are vile
jGrasp loves my code, no need to debug
I can rap in Java until it unplug
I put a semicolon at the end of each line
You haters never seen code that looked so fine

Hey homies, my code is gonna rock this place
With a method named main and a curly brace
Got help from Ms. Martin and it was swell
But I didn't need it cause I code so well
The first time I try, my code compiles
Lost a point for style cause my comments are vile
jGrasp loves my code, no need to debug
I can rap in Java until it unplug
I put a semicolon at the end of each line
You haters never seen code that looked so fine

Hey homies, my code is gonna rock this place
With a method named main and a curly brace
I got full credit on external correctness
Hey playa check this, my code eats yours for breakfast
Got help from Ms. Martin and it was swell
But I didn't need it cause I code so well
The first time I try, my code compiles
Lost a point for style cause my comments are vile
jGrasp loves my code, no need to debug
I can rap in Java until it unplug
I put a semicolon at the end of each line
You haters never seen code that looked so fine

<<--->>

The first five verses printed by your program must exactly reproduce the output above. This includes identical wording, spelling, spacing, punctuation, and capitalization. The last verse of your song (the final part in <<--->>) may print any text you like.

The only restrictions on your custom verse are the following:

  • The verse must not be identical to another verse or consist entirely of text from earlier in the song.
  • The text of the verse must be appropriate language: nothing obscene, offensive, hateful, nasty, etc. Be creative!

Part of the challenge of this assignment lies in recognizing the structure and redundancy of the song and improving the code using static methods. You should not place any println statements in your main method. (It is okay for main to have empty println statements to print blank lines.) Instead of printing in main, use static methods for structure and eliminating redundancy.

You should use only one println statement for each distinct line of the song (other than blank lines). But a method that prints just one line is not good style. Instead, identify groups of lines that appear in multiple places in the song and create methods to represent those groups. There is a general cumulative structural redundancy to the song that you should eliminate with your methods.

A decent solution to this program could have 12 methods other than main and is around 90 lines long including comments and blank lines. This is just a rough guideline; you do not have to match it exactly.