Hello! My brother recommended this site to me, he seemed to learn a lot from here. I'm working on If/Else statements for a class, and I thought I had it down until I was thrown this curve ball.
"Create an application that prints the verses of the song “The Twelve Days of Christmas”, in which the user enters the day (1-12) and each verse is printed. Use switch/case statements to break each pick into the verse. Also, make sure to use the “default” with the case statements if the user types an invalid number. On the twelfth day of Christmas, my true love sent to me, Twelve drummers drumming,
On the eleventh day of Christmas, my true love sent to me, Eleven pipers piping,
On the tenth day of Christmas, my true love sent to me, Ten lords a-leaping,
On the ninth day of Christmas, my true love sent to me, Nine ladies dancing,
On the eighth day of Christmas, my true love sent to me, Eight maids a-milking,
On the seventh day of Christmas, my true love sent to me, Seven swans a-swimming,
On the sixth day of Christmas, my true love sent to me, Six geese a-laying,
On the fifth day of Christmas, my true love sent to me, Five golden rings,
On the fourth day of Christmas, my true love sent to me, Four calling birds,
On the third day of Christmas, my true love sent to me, Three French hens,
On the second day of Christmas, my true love sent to me, Two turtle doves,
On the first day of Christmas, my true love sent to me, A partridge in a pear tree.
By the way, when a user hits 5, it should display phrases 5 – 1. When a user hits 11, it should display lines 11 – 1.
Hint 1: Inside the case structure, stick with the SAME order of phrases that I have above.
Hint 2: Loose the “break”.
Hint 3: case 10: System.out.println(“On the tenth day of Christmas, my true love sent to me, Ten lords a-leaping, “);"
I was never taught anything about case 10 or system.out.println. So I'm kinda lost. If anyone could just point me in the right direction I would be very grateful!