Reference no: EM132297825
1. Write array declarations for the following:
a. 60 double interest rates. How do you reference the 3rd element?
b. 20 integer scores. How do you reference the last element?
c. 25 characters, each representing a code. How do you reference the first element?
2. Write a Java program to input 4 values into an array named prices. After the data has been entered by the user, have your program output the values. Now output the values in reverse order.
3. Write a java program that stores these integers 10, 20, 30, 40, 20 in an array named nums. Write the code to count all the occurrences of 20 and then display the count.
Add the code to create a new integer array that has twice the number of elements as nums and assign the values in nums to the new array. Display the new array.
Try to think of a way for the program to calculate twice the number of elements for the new array.
4. Write a program that declares three arrays named price, qty, and amt. Each array should be declared in main() and capable of holding 3 values. Make up numbers for price and quantity.
Write a method to fill the amt array with the product of the corresponding elements in price and qty.
Display the values in the amt array in main.
This problem will be useful when you work on Project Five.
5. Go back to your Zeller's code. Set up an array like this:
String [] day = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"};
Replace the switch to display the day with a one statement System.out.printlnjQuery22407234776868287549_1556481381981?.