public class Drikke implements Drikkbar{ protected int maks; protected int n?v?rende; public Drikke(int maks){ this.maks = maks; this.n?v?rende = maks; } public int getMaks(){ return maks; } public int getN?v?rende(){ return n?v?rende; } @Override public void drikkGlass(){ if (n?v?rende <= 2){ n?v?rende = 0; } else{ n?v?rende -= 2; } } @Override public void fyllOpp(){ n?v?rende = maks; } @Override public String toString(){ return "Drikke: " + n?v?rende + "/" + maks + "dl"; } }