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(); } }
public void Add(string n) { VP vp = new VP(n, name); VPs[number++] = vp; }