Question
JAVA Program Create the program seen in the image on the second page by following the instructions below. This assignment is designed to get you
JAVA Program
Create the program seen in the image on the second page by following the instructions below. This assignment is designed to get you used to using the Finch robot, its API and external libraries. You will also leverage your knowledge of loops & methods.
1. Using a loop allow the program to start (and repeat) while your finches beak is NOT upside down. [Hint: think of the word not!!!!
2. Using a validation loop (within the outer loop) ensure the user enters a number within the valid range 1 through 4
3. Using a control structure of your choice to perform the necessary actions based on the users input (1 4) [Options 1 through 3 will use methods to perform these tasks, the methods can be found below]
a. Option 1 Dance: public static void dance(Finch f)
i. Takes as a Finch object as its argument
ii. The finch will verbally state that is in the method and print this information to the console
iii. Performs a 5-step dance routine of your choosing
b. Option 2 Speak: public static void saySomething(Finch f)
i. Takes as a Finch object as its argument ii. The finch will verbally state that is in the method and print this information to the console iii. Prompt the user for some text and then repeat the text verbally (Think what local variables you may need, including sc. and a ?????)
c. Option 3 Disco: public static voice disco(Finch f)
i. Takes as a Finch object as its argument
ii. The finch will verbally state that is in the method and print this information to the console and then ask the user to place the finch on its tail
iii. WHILE the finch is on its tail the finch will change its beak color, sleep for 1 second, change its beak color and repeat 6 times.
iv. The finchs beak color MUST reset back to no color after the loop has ended. CIT130
d. Option 4 Quit: No method required
i. Print that the program is ending to the console.
ii. Quit the Finch application iii. End (quit) the program using System.exit(0);
run: Connecting to Finch... this may take a few seconds... ASS Choose from the following options: 1 - Dance! 2 - Have me say something 3 - Disco Finch 4 - Quit Enter your chouce --> 123456789 Choose from the following options: 1 - Dance! 2 - Have me say something 3 - Disco Finch 4 - Quit Enter your chouce --> 1 I am in the dance method! Choose from the following options: 1 - Dance! 2 - Have me say something 3 - Disco Finch 4 - Quit Enter your chouce --> 2 I am in the saysomethign method! What would you like to say? --> Take me to your leader Choose from the following options: 1 - Dance! 2 - Have me say something 3 - Disco Finch 4 - Quit Enter your chouce --> 3 I am in the disco method! Place me on my tail to begin the disco Choose from the following options: 1 - Dance! 2 - Have me say something 3 - Disco Finch 4 - Quit Enter your chouce --> 4 Program ending. BIITT STICCESSETIT Totalme. D AAR run: Connecting to Finch... this may take a few seconds... ASS Choose from the following options: 1 - Dance! 2 - Have me say something 3 - Disco Finch 4 - Quit Enter your chouce --> 123456789 Choose from the following options: 1 - Dance! 2 - Have me say something 3 - Disco Finch 4 - Quit Enter your chouce --> 1 I am in the dance method! Choose from the following options: 1 - Dance! 2 - Have me say something 3 - Disco Finch 4 - Quit Enter your chouce --> 2 I am in the saysomethign method! What would you like to say? --> Take me to your leader Choose from the following options: 1 - Dance! 2 - Have me say something 3 - Disco Finch 4 - Quit Enter your chouce --> 3 I am in the disco method! Place me on my tail to begin the disco Choose from the following options: 1 - Dance! 2 - Have me say something 3 - Disco Finch 4 - Quit Enter your chouce --> 4 Program ending. BIITT STICCESSETIT Totalme. D AARStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started