Write a complete program with two wildcard methods: sumAll(List<? extends Number>) that reads and returns the total, and addRange(List<? super Integer>, int n) that writes the numbers 1 through n into a list.
Read n, fill an ArrayList<Integer> with addRange, print the list and its total. Then read a count and that many decimals into an ArrayList<Double> and print their total with the same sumAll.
For 3 then 2 1.5 2.5:
[1, 2, 3]
6.0
4.0
PECS in one program: extends for the producer you read from, super for the consumer you write into.