Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems Introduction To Databases And Data Warehouses

Authors: Nenad Jukic, Susan Vrbsky, Svetlozar Nestorov

1st Edition

1943153191, 978-1943153190

More Books

Students also viewed these Databases questions

Question

Why is global business important?

Answered: 1 week ago

Question

3. How would you address the problems that make up the situation?

Answered: 1 week ago

Question

2. What recommendations will you make to the city council?

Answered: 1 week ago