Question: The function A5Q7 should take in an ArrayList of Strings called words as a parameter, and return the middle value in the list. If the
The function A5Q7 should take in an ArrayList of Strings called words as a parameter, and return the middle value in the list. If the middle item is a even (list size 4) then return the rounded item (3). So for { A,B,C } return B; for { A,B,C, D } return C; Remember indexing is from 0.
THIS IS WHAT IVE DONE SO FAR IT IS NOT CORRECT :

public String A5Q7 ( ArrayList
public static void main(String[] args) { ArrayList
str.add("D"); //adding one more element to test for even size list System.out.println(getMiddleValue(str)); }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
