public class SaftProdusent implements Runnable { int antallLiter; Saftbod bod; public SaftProdusent(int liter, Saftbod sb) { antallLiter = liter; bod = sb; } @Override public void run() { for (int i = 0; i < antallLiter; i++) { bod.produserSaft(i + 1); System.out.println("Produserte " + (i + 1) + " liter saft"); try { Thread.sleep(500); } catch (InterruptedException e) { System.exit(-1); } } } }