Question 1 of 5
The Hopper class is supplied.
class Hopper {
private int grain;
public Hopper() {
grain = 12;
}
public void pour(int n) {
grain += n;
}
public int amount() {
return grain;
}
}
Hopper bin = new Hopper();
bin.pour(3);
bin.pour(4);
(a) Identify the receiver of each pour call. (b) Give the final amount(). (c) Explain how each call updates state.