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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started