Click to reopen instructions.

A few more List methods to practice with. Several of the problem in this set use a class Sale which represents a sale of some number of a given kind of item at a certain price on a particular day. The Sale class provides the instance methods String day(), String item(), int units(), and int unitPrice() to access the values of the Sale object.

Declare all your parameters, return types, and variables using the interface type List, not ArrayList. Since List is an interface, when you need to make a new list you will still construct an ArrayList, e.g. List<String> result = new ArrayList<>();

Put definitions here.

Revisions:

Test results show up here.

Errors