import java.util.Random; class Barista implements Runnable{ private final String[] drikker = {"Americano", "Caf¨¦ au lait", "Latte","Mocca", "Espresso", "Cortado"}; private Bord bord; private int id; public Barista(Bord bord, int id){ this.bord = bord; this.id = id; } public void run(){ Random r = new Random(); for(int i = 0; i < 10; i++){ //Hente ut en tilfeldig drikke String kaffe = drikker[r.nextInt(drikker.length)]; System.out.println("Barista " + id + ": lager en " + kaffe); bord.server(kaffe); } bord.server("tomt"); } }