public void printTotaalTaksen() { double totaal = 0; Iterator it = mandje.iterator(); while (it.hasNext()) { Artikel artikel = ((Aankoop) it.next()).getArtikel(); if (artikel instanceof ImportArtikel) { totaal += ((ImportArtikel) artikel).getInvoerTaks(); } } System.out.println("Totaal zonder BTW: €" + totaal); }