Concepts of an Array 1 5 9 11 13 15 17 19 1 2 3 4 5 7 odd Bria Monika William Carter Mary 1 2 name 2.4 4.8 9.6 19.2 38.4 76.8 1 4. price 1. Definitions: a. What is an array? b. What is an element of an array? c. What is an index of an element? 2. How do you declare an array? (Write Java codes for the questions below.) a. Declare an array whose name is odd. It also has 10 integer numbers. b. Declare an array whose name is name. It will take five Strings. c. Declare an array whose name is price. It will store six floating numbers. 3. If the size of an array is n, what will the last element's index? 4. How do you store information in the array? (Write Java codes for the questions below.) a. Store first 10 odd numbers in the odd array as the above picture. b. Take user's recommending 5 names and store them into the name array as the above picture. c. Initialize the first element of the price array as 2.4. Also, install the rest of elements to be twice of the previous element. 5. Use a "for" loop to print each of the above arrays.
Concepts of an Array 1 5 9 11 13 15 17 19 1 2 3 4 5 7 odd Bria Monika William Carter Mary 1 2 name 2.4 4.8 9.6 19.2 38.4 76.8 1 4. price 1. Definitions: a. What is an array? b. What is an element of an array? c. What is an index of an element? 2. How do you declare an array? (Write Java codes for the questions below.) a. Declare an array whose name is odd. It also has 10 integer numbers. b. Declare an array whose name is name. It will take five Strings. c. Declare an array whose name is price. It will store six floating numbers. 3. If the size of an array is n, what will the last element's index? 4. How do you store information in the array? (Write Java codes for the questions below.) a. Store first 10 odd numbers in the odd array as the above picture. b. Take user's recommending 5 names and store them into the name array as the above picture. c. Initialize the first element of the price array as 2.4. Also, install the rest of elements to be twice of the previous element. 5. Use a "for" loop to print each of the above arrays.
Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter6: Arrays
Section: Chapter Questions
Problem 17RQ
Related questions
Question
I’m having trouble with these Java questions
Please help
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage