To everyone ... (a little long because so many of you are sick) I was getting very annoyed at the end of class. Our code should have worked. It did! The revised test "addBefore" was at the bottom of the list of the JUnit tests. It had a green check mark. Argh! I hate small screens and the delay using Exceed. I still don't know why it was at the bottom. The code we had written for addBefore was (yes, you may copy this): public void addBefore(double element) { // ensure capacity if (!isCurrent( )) { start( ); } System.arraycopy(data, currentIndex, data, currentIndex+1, manyItems-currentIndex); data[currentIndex] = element; manyItems++; } You need to implement the other methods. The ensureCapacity method will be a lot like the one for the bag as in the text and the examples directory at: http://cs.millersville.edu/~katz/cs162/examples/bags/bagPartialArray/ but remember the sequence is arrays of type double. After you implement that, you can call it from addBefore. That should make the array expand as needed, and the addBefore method should pass its tests. The addAfter method will be similar. Draw pictures. Remember that if there is no current item, addAfter adds the item at the end. Think about what that means. What elements in data need to move? Use System.arraycopy as needed. Check that the invariant is true before you end each method. This assignment is due Monday March 3rd at 10pm regardless of weather. Do it in small pieces. Build some; test. Build some; test. -------- help for those who missed class -------- When there is no current item, addBefore inserts at the beginning and addAfter inserts at the end. Before we had the code above, we had comments describing what we needed to do: public void addBefore(double element) { // ensure capacity // if there's no current, move to beginning // move the elements over to make room // insert element // check that the class invariant is true by checking // all the instance variables } The JUnit tests are bigger than they should be. So we created a smaller one that only did a few addBefores. That's what didn't seem to be working but was. It's probably good to get notes from someone.