public class Hovedprogram { public static void main(String[] args) { Hund fido = new Hund("Fido", 5); Hund rex = new Hund("rex", 10); fido.settBestevenn(rex); int teller = 0; while (teller < 5) { fido.bjeff(); teller++; } if (fido.hentAlder() == 10) { System.out.println("gammel hund"); } else { System.out.println("ung og rask"); } } }