Question: in java 7 . 6 Fill in the blanks in each of the following statements: One - dimensional array p contains four elements. The names

in java
7.6 Fill in the blanks in each of the following statements:
One-dimensional array p contains four elements. The names of those elements are ,, and .
Naming an array, stating its type and specifying the number of dimensions in the array is called the array.
In a two-dimensional array, the first index identifies the of an element and the second index identifies the of an element.
An m-by-n array contains rows, columns and elements.
The name of the element in row 3 and column 5 of array d is .
7.7 Determine whether each of the following is true or false. If false, explain why.
To refer to a particular location or element within an array, we specify the name of the array and the value of the particular element.
An array declaration reserves space for the array.
To indicate that 100 locations should be reserved for integer array p, you write the declaration
p[100];
An application that initializes the elements of a 15-element array to zero must contain at least one for statement.
An application that totals the elements of a two-dimensional array must contain nested for statements.
7.8 Write Java statements to accomplish each of the following tasks:
Display the value of element 6 of array f.
Initialize each of the five elements of one-dimensional integer array g to 8.
Total the 100 elements of floating-point array c.
Copy 11-element array a into the first portion of array b, which contains 34 elements.
Determine and display the smallest and largest values contained in 99-element floating-point array w.
7.9 Consider a two-by-three integer array t.
Write a statement that declares and creates t.
How many rows does t have?
How many columns does t have?
How many elements does t have?
Write access expressions for all the elements in row 1 of t.
Write access expressions for all the elements in column 2 of t.
Write a single statement that sets the element of t in row 0 and column 1 to zero.
Write individual statements to initialize each element of t to zero.
Write a nested for statement that initializes each element of t to zero.
Write a nested for statement that inputs the values for the elements of t from the user.
Write a series of statements that determines and displays the smallest value in t.
Write a single printf statement that displays the elements of the first row of t.
Write a statement that totals the elements of the third column of t. Do not use iteration.
Write a series of statements that displays the contents of t in tabular format. List the column indices as headings across the top, and list the row indices at the left of each row.
7.10(Sales Commissions) Use a one-dimensional array to solve the following problem: A company pays its salespeople on a commission basis. The salespeople receive $200 per week plus 9% of their gross sales for that week. For example, a salesperson who grosses $5,000 in sales in a week receives $200 plus 9% of $5,000, or a total of $650. Write an application (using an array of counters) that determines how many of the salespeople earned salaries in each of the following ranges (assume that each salespersons salary is truncated to an integer amount):
$200299
$300399
$400499
$500599
$600699
$700799
$800899
$900999
$1,000 and over

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