/* Java application that prints (most of) the lyrics of (one version of) ** the Irish folk song "The Rattlin' Bog". ** This version was produced without any attempt to apply the principle ** of procedural decomposition. ** ** CMPS 134 Fall 2025 Prog. Assg. #1 ** Author: R. McCloskey < Replace with YOUR NAME > ** Aided by: ** Known Flaws: */ public class RattlingBog { /* Prints the song lyrics. */ public static void main(String[] args) { // chorus println("Ho ro the rattlin\' bog"); println("The bog down in the valley-o."); println("Ho ro the rattlin\' bog"); println("The bog down in the valley-o."); println(""); // verse 1 println("Now in this bog there was a tree"); println("A rare tree, a rattlin\' tree."); println("The tree in the bog and"); println("The bog down in the valley-o."); println(""); // chorus println("Ho ro the rattlin\' bog"); println("The bog down in the valley-o."); println("Ho ro the rattlin\' bog"); println("The bog down in the valley-o."); println(""); // verse 2 println("And on this tree there was a limb"); println("A rare limb, a rattlin\' limb."); println("The limb on the tree and"); println("The tree in the bog and"); println("The bog down in the valley-o."); println(""); // chorus println("Ho ro the rattlin\' bog"); println("The bog down in the valley-o."); println("Ho ro the rattlin\' bog"); println("The bog down in the valley-o."); println(""); // verse 3 println("And on this limb there was a branch"); println("A rare branch, a rattlin\' branch."); println("The branch on the limb and"); println("The limb on the tree and"); println("The tree in the bog and"); println("The bog down in the valley-o."); println(""); // chorus println("Ho ro the rattlin\' bog"); println("The bog down in the valley-o."); println("Ho ro the rattlin\' bog"); println("The bog down in the valley-o."); println(""); // verse 4 println("And on this branch there was a twig"); println("A rare twig, a rattlin\' twig."); println("The twig on the branch and"); println("The branch on the limb and"); println("The limb on the tree and"); println("The tree in the bog and"); println("The bog down in the valley-o."); println(""); // chorus println("Ho ro the rattlin\' bog"); println("The bog down in the valley-o."); println("Ho ro the rattlin\' bog"); println("The bog down in the valley-o."); println(""); // verse 5 println("And on this twig there was a leaf"); println("A rare leaf, a rattlin\' leaf."); println("The leaf on the twig and"); println("The twig on the branch and"); println("The branch on the limb and"); println("The limb on the tree and"); println("The tree in the bog and"); println("The bog down in the valley-o."); println(""); // chorus println("Ho ro the rattlin\' bog"); println("The bog down in the valley-o."); println("Ho ro the rattlin\' bog"); println("The bog down in the valley-o."); } /* Method that acts as a surrogate for System.out.println(). */ private static void println(String s) { System.out.println(s); } }