I wanted to put in an add method but we are supposed to use what is in our outline.
Basically, you are writing test code. If you modify your class with special methods just for your test code, aren't you just wasting a testing opportunity?
Your class seems to have two add methods that add individual elements -- addBefore and addAfter. Do they work correctly? Have you tested them? If you have tested them, I am assuming that you wrote a loop that load them up? And if you did, can you reuse that testing code here?
I guess that's my problem, I was trying to use my addAfter in my test code to get started but was unsuccessful. Once I get going with my array I think I'll be fine, I think that I confuse myself with my variables and I'm stuck.
Joined: Jan 07, 2008
I am narrowing it down to my addAfter and addBefore methods now that they are fixed (I think), my question is about the outputs. I know it is still too much code but I am not understanding my output-- 1)Why is the addBefore order reversed and why does the list for test 1 not display 9 from the addAfter? 2)Why are there three sets of zeros at the end of the double list?