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