Question: Write Java code to declare and initialize an array of assignment scores for 10 students. (Scores should range from 0 to 100.) Now, write Java

Write Java code to declare and initialize an array of assignment scores for 10 students. (Scores should range from 0 to 100.) Now, write Java code to declare and initialize an array of student names.

Here are some questions to ask yourself as you write the code:

What should the data type of the array be (i.e. what kind of data does it store)?

What should the size of the array be?

Should I declare and initialize in one step? Or should I use multiple lines of code?

Example - One Step:

int[] oddNums = {1, 3, 5, 7, 11, 13, 15, 17, 19};

Example - Multiple Lines of Code: int[] oddNums = new int[9]; oddNums[0] = 1; oddNums[1] = 3; oddNums[8] = 19;

Draw a picture in memory of your two arrays after initialization.

Calculate the mean for your scores array.

Write a line of code to call the printGreater() method on your scores.

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