Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data Systems A 360-degree Approach

Authors: Jawwad ShamsiMuhammad Khojaye

1st Edition

0429531575, 9780429531576

More Books

Students also viewed these Databases questions

Question

=+1. Who is responsible for CSRfirms or their stakeholders? Why?

Answered: 1 week ago