Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Array Worksheet (Due Tomorrow as of 02-08-2020) and reference array Information Sheet given below, otherwise no other point of reference is given. Just make something

Array Worksheet (Due Tomorrow as of 02-08-2020) and reference array Information Sheet given below, otherwise no other point of reference is given. Just make something up.

image text in transcribed

*****************************************************************

Array Reference Sheet Below:

image text in transcribedimage text in transcribed

Java Arrays - Worksheet 1 | 5. Code the statement that would add a field called salary to the 3rd member of an array called accum. 6. Code the statement that would print the results from the 1st member of a double array called average? 7. Code the statements that would print the days of the week from the array coded in question #1, on separate lines. (Use a loop.) Java Information Sheet - Arrays What is an array? An array is a place in memory that is used to store multiple values that have the same data type. For example, we can have a character array, integer array, or float array but not a mixture of . data types. . . . By using one name, we save time by not having to define a unique name for each variable. We also can save time when processing the array in our code Since these multiple values are stored under the same variable name (array), we need a way to distinguish one value from another. A subscript index) is used to do this. Define a variable index using an int data type. In java the index of the first array member is 0. The square brackets can go after the data type, or after the array name. Java standards typically place the brackets after the data type. . . Example 1: non-initialized integer array. Definition of array: - 10 integers are defined. static int[] grade; grade = new int[10]: 1/create an array reference called grade // makes 10 grade variables Use of array: grade[0] = 85; 1/ assigns 85 to 1st grade. grade[i] = ingrade; // assigns value of ingrade to the i + 1 grade. // use a for loop to initialize all grades. for(i=0; i

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

Step: 3

blur-text-image

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

PostgreSQL Up And Running A Practical Guide To The Advanced Open Source Database

Authors: Regina Obe, Leo Hsu

3rd Edition

1491963417, 978-1491963418

More Books

Students also viewed these Databases questions

Question

How do propositions and hypotheses differ?

Answered: 1 week ago

Question

What qualities do you see as necessary for your line of work?

Answered: 1 week ago