class Bokhylle { Bok[] bokhylle = new Bok[20]; int storrelse = 0; void settInn(Bok bok) { if (storrelse == 20) { System.out.println("Ikke flere plasser"); return; } for (int i = 0; i < bokhylle.length; i++) { if (bokhylle[i] == null) { bokhylle[i] = bok; storrelse++; return; } } } void fjern(Bok bok) { for (int i = 0; i < bokhylle.length; i++) { if (bokhylle[i] == bok) { bokhylle[i] = null; storrelse--; return; } } } void finn(String forfatter) { for (int i = 0; i < bokhylle.length; i++) { if (bokhylle[i].hentForfatter() == forfatter) { System.out.println("Vi fant en bok fra forfatteren " + forfatter); return; } System.out.println("Fant ingen b?ker av " + forfatter); } } }