//  Data Structures with Java by John R. Hubbard
//  Copyright McGraw-Hill, 2001
//  Example 5.7 on page 100
//  Testing a contains() method for the Bag class

public class Ex0507
{ public static void main(String[] args)
  { String[] food = { "egg", "ham", "rum", "tea" };
    Bag foodBag = new Bag(food);
    System.out.println(foodBag);
    if (foodBag.contains("fig")) System.out.println("fig");
    else System.out.println("no fig");
    if (foodBag.contains("ham")) System.out.println("ham");
    else System.out.println("no ham");
  }
}
