Question: How do I find the recommended 12 days? Programming Exercise 5-10 X Tasks TwelveDays.java + >_ Terminal + 1 import java. util.*; sandbox $ The

How do I find the recommended 12 days?

How do I find the recommended 12 days? Programming Exercise 5-10 XTasks TwelveDays.java + >_ Terminal + 1 import java. util.*; sandbox $

Programming Exercise 5-10 X Tasks TwelveDays.java + >_ Terminal + 1 import java. util.*; sandbox $ The TwelveDays program displays the song 2 public class TwelveDays { 0.00 lyrics starting at the provided day. Scanner input = new Scanner (System. in) ; out of 10.00 public static void main (String args[ ]) { // Write your code here > Click the checkbox above to attempt this task. } 7 public static int getChoice( ) { 8 / / Write your code here Checks 9 103 Test Case . Incomplete 11 Day 5 12 13 Test Case . Incomplete Day 2 Test Case . Incomplete Day 11 Test Case . Incomplete > Day 12 Test Case . Incomplete Day 1 Run checks Submit 0%Programming Exercise 5-10 X Instructions TwelveDays.java + >_ Terminal + 1 import java. util.*; sandbox $ Below are the lyrics for the song "The Twelve Days of 2 public class TwelveDays { Scanner input = new Scanner (System. in) ; Christmas." The song contains a list of gifts received for public static void main (String args[ ]) { the holiday. The list is cumulative so that as each "day" / / Write your code here > passes, a new verse contains all the words of the previous 6 } verse, plus a new item. 7 public static int getChoice() { 8 // Write your code here 9 10 } On the 12th day of Christmas 11 My true love gave to me 12 Twelve drummers drumming 13 Eleven pipers piping Ten lords a-leaping Nine ladies dancing Eight maids a-milking Seven swans a-swimming Six geese a-laying Five golden rings Four calling birds Three French hens Two turtle doves and A partridge in a pear tree Implement the TwelveDays application that displays the words to the song starting with any day the user enters. (Hint: Use a switch statement with cases in descending day order and without any break statements so that the lyrics for any day repeat all the lyrics for previous days.) ? An example of the program is shown below

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!