Write BoundedGenerics with four generic methods:
<T extends Comparable<T>> int countGreater(List<T> items, T limit)<T extends Comparable<T>> boolean isSorted(List<T> items)<T extends Comparable<T>> T clamp(T value, T low, T high)<N extends Number> double average(List<N> numbers)
Input: n and n integers, an integer limit, m and m words, a word limit. Each method must work for both integers and strings where it makes sense.
For the input
5 3 9 4 12 7 6 4 pear apple kiwi fig hello
the program prints
numbers > 6: 3
numbers sorted: false
average: 7.00
clamp(6, 0, 10): 6
words > hello: 2
words sorted: false
clamp(hello, d, p): hello