Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In JAVA Task 4: Reading Arrays public static int sumEvens (int xs) public static int sumTwoLargest (int [] xs) Given an array of integers, find
In JAVA
Task 4: Reading Arrays public static int sumEvens (int xs) public static int sumTwoLargest (int [] xs) Given an array of integers, find all the even ones, and add them up; return this sum. Given an array of integers, find the largest two values in the array, and return their sum. When the array is empty, return zero. When there is only one item in the array, return that single number When there are duplicates of the highest value, use both of them. For example, feeding the array 1, 4,5, 5,2 to this method would return (5+5)=10. (It doesnt use the 4.) Manual Inspection Criteria(5%) Solve this one with a single loop (any kind) public static double projectsAverage(int scares, String[]kinds) We have two array parameters of the same length; at the same index location, the scores array contains an integer from 0 to 100, and the kinds array contains one of these strings "test", "project, "Iab, and "quiz. Find all the project scores, and calculate their average Return this double answer the length of the arrays might be zero . there might not be any project scores recorded yet Manual Inspection Criteria(5%) Solve this one with a single loop (any kind)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