示例#1
0
 public TestDivision()
 {
     //create the Sales division
     division = new Division("Sales");
     //add some VP
     division.Add("Ash");
     division.Add("Bob");
     division.Add("Catherine");
     division.Add("Dianna");
     iterator = division.iterator();
     //loop over the collection of VP,display each one
     while (iterator.hasNext())
     {
         VP vp = iterator.Next();
         vp.print();
     }
 }
示例#2
0
        public void Add(string n)
        {
            VP vp = new VP(n, name);

            VPs[number++] = vp;
        }