Advertisement
Guest User

Untitled

a guest
May 22nd, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. Write a function that will takes a List of ArrayList as a 1srt parameter and an integer as the 2nd parameter and return the average of each index value together as an ArrayList element of a List
  2.  
  3. example:
  4. 1srt parameter = myList [[5, 6, 7, 8, 9], [3, 4, 5, 2, 4], [4, 3, 7, 9, 11], [6, 2, 3, 5, 8]]
  5. 2nd parameter = 4;
  6. And after execution of the function the return value is a list of the averages, in this case we only have 1:
  7. returned list: [[4, 7, 5, 6, 8]]
  8.  
  9.  
  10. public List<List<String>> computeAv(List<List<String>> myList, int avDegree) {
  11. List<List<String>> averagesList= new ArrayList<>();
  12.  
  13.  
  14. return averagesList;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement