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
egoroff_w [7]
3 years ago
12

Answer the following questions concerning Arrays and write down the corresponding Java statements. Please type in the answers he

re and submit them on Canvas. Declare and instantiate an array called myExams to hold 4 exam scores. The exam scores will be floating-point numbers (double). After declaring array myExams, each element of the array has what value in it? Now, load the following exam scores into your existing array. 92.3 82.0 98.4 91.0 Display the 2nd component of myExams using System.out.println? What are you expecting to be displayed with the above statement? Display all of the components of your array using System.out.println in a for loop. Add up all of the exam scores in your array and store the total in a double variable called sum. This will be another for loop! Explain array bounds checking. What happens when an invalid index is used for an array? Display all of the components of your array using for each loop also called an enhanced for loop.
Computers and Technology
1 answer:
vladimir1956 [14]3 years ago
6 0

Answer:

Check the explanation

Explanation:

(1)

class Brainlyarray{  

public static void main(String args[]){  

double myExams[]=new double[4]; //declaration & instantiation  

(2)

Each index of the array myExams have a garbage value stored on it's every index as at this point only the array is declared but not initialized the indexes are not holding any value yet.

(3)

myExams[0]=92.3; //initialization  

myExams[1]=82.0; //initialization

myExams[2]=98.4;  //initialization

myExams[3]=91.0;    //initialization

(4)

System.out.println(myExams[1]); // Will Print the 2nd component of the array

(5)

It will print the 2nd index of the 1D array myExams and the value which will be printed on the screen is 82.0

(6)

for(int i=0;i<myExams.length;i++) // length is the size of this 1D array and in this for loop this loop will run till the end of the length of the array which means till the size of the array.

System.out.println(myExams[i]);  

(7)

double sum=0.0; // Delaration of the sum variable

for(double num : myExams){ //For loop here num is the storage container where all the elements of the array myExams are been stored

sum=sum+num;

}

(8)

Array Bound Checking is basically the process in which it is being ensured that the value that is been entered is meeting the array boundaries or not as the array index value should be equal or greater than zero and less or equal to the size of the array.

and if we enter an invalid index value so it will be throwing an exception in thread of the main.

(9)

for ( double value : myExams){ //for each loop (Enhanced for loop )

System.out.println(myExams);

}

////////////////////////////////////////////////////////////////////////////////

You might be interested in
What are some good digital habits?
kkurt [141]

ANSWER

1. Turn off all the notifications.

2. Set your phone to black and white.

5 0
2 years ago
Read 2 more answers
Derek is working at the help desk when he receives a call from a client about an issue with the company's email. The customer is
jeka57 [31]

Answer:

Give the customer time to express his/her anger and then restart the conversation.

Explanation:

A person working as a help desk executive is meant to be equipped with customer service skills and experience. They are the mediator between the customers and the actual service providers in a company.

A good help desk executive should have good communication skills, they should have the ability to diffuse tension which it needed in this context.

7 0
3 years ago
PLEASE PLEASE PLEASE PLEASE HELP ASAP!!!!! I PROMISE I WILL GIVE YOU A BRAINLIEST FOR THE CORRECT ANSWER PLEASE HELP!!
inysia [295]
The answer will be C

As she is about to leave the position, in account of professionalism, she should NOT do any unnecessary harm to the current company, and  she should notify the company for necessary description before leaving. 
5 0
3 years ago
Read 2 more answers
6.Decreasing a telescope's eyepiece focal length will:
Ghella [55]
B is the correct answer to ur questions
8 0
3 years ago
Which formula is used to measure accuracy?
shepuryov [24]
<span>Gross WPM – Net WPM x 100
So B</span>
7 0
3 years ago
Other questions:
  • You are given n sorted sequences each one containing n keys. You may assume n is a power of two. We want to merge them into one
    15·1 answer
  • You can clear a log file simply by redirecting nothing into it. true or false?
    13·1 answer
  • What is the best reason to delete Internet browsing history on a regular basis? to solve a computer hardware problem to protect
    13·2 answers
  • You have just installed a new sound card in your system, and Windows says the card installed with no errors. When you plug up th
    5·1 answer
  • This matches the domain name with the correct IP address:
    12·1 answer
  • What is one way to recognize whether an online source has been copyrighted? The source features the phrase “all rights reserved.
    6·2 answers
  • You are not sure if a certain word has an"e"at the end<br>​
    11·1 answer
  • Please could you help me
    6·2 answers
  • 2+2? D: I don't knoww​
    12·1 answer
  • a value-returning method must specify as its return type in the method header. question 18 options: a) an int b) a double c) a b
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!