BagTest

BagTest - fifteenItems.add(11 fifteenItems.add(100...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
import static org.junit.Assert.*; import org.junit.Before; import org.junit.Test; public class BagTest { // data members private Bag sixItems, eightItems, fifteenItems; @Before public void setup() { sixItems = new Bag(); sixItems.add(40); sixItems.add(17); sixItems.add(29); sixItems.add(0); sixItems.add(4); sixItems.add(77); eightItems = new Bag(); eightItems.add(0); eightItems.add(5); eightItems.add(17); eightItems.add(20); eightItems.add(41); eightItems.add(34); eightItems.add(100); eightItems.add(6); fifteenItems = new Bag(); fifteenItems.add(4); fifteenItems.add(0); fifteenItems.add(3); fifteenItems.add(10);
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: fifteenItems.add(11); fifteenItems.add(100); fifteenItems.add(45); fifteenItems.add(25); fifteenItems.add(12); fifteenItems.add(13); fifteenItems.add(2); fifteenItems.add(89); fifteenItems.add(79); fifteenItems.add(50); fifteenItems.add(66); } // input expected return // sixItems 40,17,29,0,4,77 // nineItems 0,5,17,20,41,34,100,6 // seventeenItems 4,0,3,10,11,100,45,25,12,13,2,89,79,50,66 @Test public void testAdd() { System.out.println(sixItems); System.out.println(eightItems); System.out.println(fifteenItems); } }...
View Full Document

This note was uploaded on 06/10/2011 for the course COMP 110 taught by Professor Stotts during the Spring '08 term at UNC.

Page1 / 2

BagTest - fifteenItems.add(11 fifteenItems.add(100...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online