Which of the following statements is correct?

A. Case structures are ideal for traversing two-dimensional arrays.
B. Nested For loops are ideal for traversing two-dimensional arrays.
C. Do while loops are ideal for traversing two-dimensional arrays.
D. Nested For loops are ideal for traversing one-dimensional arrays.


Answer: B

Computer Science & Information Technology

You might also like to view...

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 $5000 in sales in a week receives $200 plus 9% of $5000, 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 (assuming that each salesperson’s salary is truncated to an integer amount): $200–299, $300–399, $400–499, $500–599, $600–699, $700–799, $800– 899, $900–999 and over $999. Allow the user to enter the sales for each employee in a JTextField. The user should click the Calculate JButton to calculate that salesperson’s sala


a) Copying the template to your working directory. Copy the C:Examples Tutorial16ExercisesSalarySurvey directory to your C:SimplyJava directory.
b) Opening the template file. Open the SalarySurvey.java file in your text editor.
c) Create an array that represents the number of salaries in each range. On lines 32–33, create an empty int array called resultArray to store the number of employees who earn salaries in each range. Use line 32 for a comment and line 33 to create the array. The elements of resultArray will represent different ranges in the survey. Specify the size of resultArray as 11 using keyword new. There are 9 salary ranges in this application. For convenience, we use a slightly larger array, of size 11. You will ignore the first two elements of this array. The elements you will use are at locations
2–10, where each location represents a salary range (location 2 represents the range
200–299, location 3 represents the range 300–399, etc.). The proper locat

Computer Science & Information Technology

A dialog capable of receiving input from the user is displayed with method_________of object_________.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

The ____________________ is the location on your computer screen at which you type entries to communicate with the computer's operating system.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

Encryption is a process that secures data by converting information so that it can be read only by someone with permission to do so.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology