Class Activities Week 9 Lecture 3

  1. Implement calculateTermQuizScore() that accepts an ArrayList of Integers as an argument and returns a double representing the quiz grade for the quarter.
  2. Implement countMatches() that accepts an ArrayList of Integers and an int value as arguments and returns the number of times the value was found in the list.
  3. Implement getShortWords() that accepts an ArrayList of Strings as an argument and returns a new ArrayList of Strings containing all of the elements with at least six characters.
  4. Implement removeShortWords() that accepts an ArrayList of Strings as an argument and removes all of the elements with fewer than six characters.
  5. Implement union() that accepts two ArrayLists of Integerss as arguments and returns a new ArrayList with all of values that are found in both ArrayLists. The returned list should not contain duplicates.
  6. Implement sum28() that accepts an ArrayLists of Integerss as an argument and returns true if the sum of all the 2's is exactly 8.
  7. Implement areDescending() that accepts an ArrayLists of Integerss as an argument and returns true if all of the elements are in descending order. E.g., {12, 8, 2, 2, 0, -3}.
  8. Implement centerAverage() that accepts an ArrayLists of at least three Integerss as an argument and returns the average of all but the smallest and largest element in the list.
  9. Implement copyFourLetterWords() that accepts an ArrayLists of Strings as an argument and returns a new ArrayList of Strings containing all of the words with a length of four.