Correct method order in Bag.java