import java.util.Iterator; class KennelTest { public static void main(String[] args) { Kennel kennel = new Kennel(); Hund hund = new Hund("Doge", 5); Katt pus = new Katt("Snofot", 12); Hund hund2 = new Hund("Manell", 5); kennel.skrivAlle(); kennel.sjekkInn(hund); kennel.sjekkInn(hund2); kennel.sjekkInn(pus); kennel.skrivAlle(); Iterator it = kennel.iterator(); while (it.hasNext()) { System.out.println(it.next()); } // for (Husdyr dyr : kennel) { // System.out.println(dyr); // } System.out.println(kennel.taUt(1)); System.out.println(kennel.taUt(123)); kennel.skrivAlle(); } }