Question: Write one Java application based on the following directions and algorithms. Make sure the results from each of the numbered items is separate and easy

Write one Java application based on the following directions and algorithms. Make sure the results from each of the numbered items is separate and easy to read/understand.

1.Create an array that will hold 4 string values. Write three separate statements to store your favorite color, your favorite song, and your favorite restaurant in the array elements. I do not want you to use a loop in this logic; use hard-coded index values instead. Print *ALL FOUR* of the values of the array using individual index values. What is stored in the element you did not fill?

2.Create an array that will hold 5 string values. Use a for loop to prompt the user to enter their 5 favorite movies and store each one in a separate element of the array. Print the values of the array using a For-Each loop.

3.Create an array to hold 7 doubles. Use any looping structure you want to prompt the user to enter a value and store it in the array. In a separate loop, compute the sum of the values. In a third, separate loop, display the array values in reverse order. Also display the sum.

4.Create an array that will hold 3 integers. Without prompting the user for input or using a loop, fill that array with the values 23, 0, and -5. Write decision logic to determine whether the values in each array element is negative, positive, or equal to zero. Make the decision logic loop 3 times, since we want to test 3 different values.

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 Databases Questions!