Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I need help with the following: Write an application that uses repetition and sw

ID: 3617422 • Letter: I

Question

I need help with the following: Write an application that uses repetition and switchstatements to print the song "The Twelve Days of Christmas." One switch statement should be used to print the day ("first,""second," and so on). A separate switch statement should be used toprint the remainder of each verse.
Structure
"The Twelve Days of Christmas" is a cumulativesong, meaning that each verse is built on top of theprevious verses. There are twelve verses, each describing a giftgiven by "my true love" on one of the twelve days ofChristmas.
The first verse runs:
On the first day of Christmas, my true love gave tome...
A Partridge in a Pear Tree. The second verse:
On the second day of Christmas, my true love gave tome...
2 Turtle Doves
And A Partridge in a Pear Tree. The third verse begins to show some metrical variance, asexplained below:
On the third day of Christmas, my true love gave tome...
3 French Hens
2 Turtle Doves
And A Partridge in a Pear Tree. ...and so forth, until the last verse:
On the twelfth day of Christmas, my true love gave tome...
12 Drummers Drumming
11 Pipers Piping
10 Lords-a-Leaping
9 Ladies Dancing
8 Maids-a-Milking
7 Swans-a-Swimming
6 Geese-a-Laying
5 Golden Rings
4 Calling Birds
3 French Hens
2 Turtle Doves
And A Partridge in a Pear Tree. I need help with the following: Write an application that uses repetition and switchstatements to print the song "The Twelve Days of Christmas." One switch statement should be used to print the day ("first,""second," and so on). A separate switch statement should be used toprint the remainder of each verse.
Structure
"The Twelve Days of Christmas" is a cumulativesong, meaning that each verse is built on top of theprevious verses. There are twelve verses, each describing a giftgiven by "my true love" on one of the twelve days ofChristmas.
The first verse runs:
On the first day of Christmas, my true love gave tome...
A Partridge in a Pear Tree. The second verse:
On the second day of Christmas, my true love gave tome...
2 Turtle Doves
And A Partridge in a Pear Tree. The third verse begins to show some metrical variance, asexplained below:
On the third day of Christmas, my true love gave tome...
3 French Hens
2 Turtle Doves
And A Partridge in a Pear Tree. ...and so forth, until the last verse:
On the twelfth day of Christmas, my true love gave tome...
12 Drummers Drumming
11 Pipers Piping
10 Lords-a-Leaping
9 Ladies Dancing
8 Maids-a-Milking
7 Swans-a-Swimming
6 Geese-a-Laying
5 Golden Rings
4 Calling Birds
3 French Hens
2 Turtle Doves
And A Partridge in a Pear Tree. Write an application that uses repetition and switchstatements to print the song "The Twelve Days of Christmas." One switch statement should be used to print the day ("first,""second," and so on). A separate switch statement should be used toprint the remainder of each verse. Structure
"The Twelve Days of Christmas" is a cumulativesong, meaning that each verse is built on top of theprevious verses. There are twelve verses, each describing a giftgiven by "my true love" on one of the twelve days ofChristmas.
The first verse runs:
The second verse:
The third verse begins to show some metrical variance, asexplained below:
...and so forth, until the last verse:

Explanation / Answer

x.Xce="Courier New">public static void main(String[] args) { for(int i = 1; i = 1; j--) { System.out.print(j+" "); String gift = ""; switch(j) { case 12: gift = "Drummers Drumming"; break; case 11: gift = "Pipers Piping"; break; case 10: gift = "Lords-a-Leaping"; break; case 9: gift = "Ladies Dancing"; break; case 8: gift = "Maids-a-Milking"; break; case 7: gift = "Swans-a-Swimming"; break; case 6: gift = "Geese-a-Laying"; break; case 5: gift = "Golden Rings"; break; case 4: gift = "Calling Birds"; break; case 3: gift = "French Hens"; break; case 2: gift = "Turtle Doves";