1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
g100num [7]
4 years ago
12

7.1 Write statements that create the following arrays: A 100-element int array referenced by the variable employeeNumbers. final

int employeeNumbers = 100; int [] numbers = new int[employeeNumbers]; B 25-element double array referenced by the variable payRates. final double payRates = 25; int[] numbers = new int [Double] C.A 14-element float array referenced by the variable miles. float[] miles = 14; D 1000-element char array referenced by the variable char[] letters = new char[1000]; 7.2 What’s wrong with the following array declarations? int[] readings = new int[−1]; double[] measurements = new double[4.5]; There should be no negs. 7.3 What would the valid subscript values be in a four-element array of doubles? 7.4 What is the difference between an array’s size declarator and a subscript? My: idk 7.5 What does it mean for a subscript to be out-of-bounds? My: Declares error
Computers and Technology
1 answer:
maria [59]4 years ago
7 0

Answer:

A. int [ ] numbers = new int[employeeNumbers];

B. double[ ] numbers = new double[payRates];

C. float[ ] miles = new float[14];

D. char[ ] letters = new char[1000];

7.2 Size of array cannot be negative

Size of array should be a positive integer and not decimal.

7.4 The size declarator is used in a definition of an array to indicate the number of elements the array will have. A subscript is used to access a specific element in an array.

7.5 subscript to be out-of-bound means the specified integer is not within the range of the length of the array.

Explanation:

The question has answer given for some. I guess the explanation is what is needed.

A. The general format of creating an array is:

data type[] arrayRefVar=new datatype[size];

In this case, the datatype is int, arrayRefVar is numbers, size is employeeNumbers. The size was already initialised to 100 (employeeNumber).

B. A wrong datatype was used.

double[ ] numbers = new double[payRates];

would create an array of size 25 which is the payRates with types double.

C. The array was re-written using the general format of creating an array is:

data type[] arrayRefVar=new datatype[size];

D. The array was correctly defined.

You might be interested in
A type of address translation in which a gateway has a pool of public ip addresses that it is free to assign to a local host whe
krok68 [10]
<span>Dynamic Network Address Translation (DNAT)</span>
7 0
3 years ago
Which is used for making documentation file from microsoft office package​
ratelena [41]

Answer:

the word is use for making docs

5 0
3 years ago
Read 2 more answers
An email message containing a warning related to a non-existent computer security threat, asking a user to delete system files f
LenKa [72]

Answer: Virus Hoax

Explanation:

A computer virus hoax is a message that warns someone of a false virus threat. It is a a chain email that encourages who ever has received the message to pass it to other people as a form of warning.

5 0
3 years ago
I have been trying for 2 days to make an account, but it says registration cannot be completed at this time. It is extremely ann
Lady_Fox [76]

Answer: Ok what kind account are you trying to make if you need a account i can make one for you here is my hangout email . So i can give you the info to the account i made for you.

6 0
3 years ago
Read 2 more answers
A website is unencrypted. Which tool can be used to stop the website’s traffic and analyze the information on it?
liraira [26]

Answer:

Web analytics support information about the number of users to a website and the number of page views. It helps measure traffic and popularity trends which is useful for market study.

Explanation:

6 0
3 years ago
Other questions:
  • Splunk In most production environments, _______ will be used as the source of data input?
    12·1 answer
  • DESCRIBE FLOPPY DISK
    15·1 answer
  • _______is the equal distribution of visual weight on either side of an imaginary axis through the center of a design. A building
    6·2 answers
  • You tried to access an external html page, which can not be opened on the device for preview. open the page in dreamweaver to pr
    13·1 answer
  • When designing a suitable and safe flexibility training program, you should set reasonable and appropriate goals depending on wh
    15·1 answer
  • A. What sectors are used with Foo?
    8·1 answer
  • The commands available from a menu change depending upon what you are doing.<br> True<br> False
    11·2 answers
  • Which code will allow Jean to print Coding rocks! on the screen?
    6·1 answer
  • Write a program that takes a first name as the input, and outputs a welcome message to that name.
    9·1 answer
  • Suppose that a disk drive has 5,000 cylinders, numbered 0 to 4,999. The drive is currently serving a request at cylinder 2,150,
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!