Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1) Modify the One-dimensional Arrays Example 2) Add the following functionally (methods NOT needed) a. MUST use for loop(s) and arrays for the next 3
1) Modify the One-dimensional Arrays Example
2) Add the following functionally (methods NOT needed) a. MUST use for loop(s) and arrays for the next 3 items (hint: our book covers the 1st two specifically):
i. Compute and display the sum of all the integers in the array
ii. Compute and display the average of all the integers in the array
iii. Determine the # of passing grades (70 and above) and display the total # of passing grades in the array
Sample output shown
One-dimensional Array Example package arraytest; import java.util.Scanner; public class ArrayTest{ static final int MAX = 3; public static void main(String[] args) { Scanner input = new Scanner(System.in); int[] grades = new int [MAX]; // declare 1D array // for loop used to read values into 1D array for (int i=0; iStep 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