public class SparegrisProgram { public static void main(String[] args) { Sparegris s = new Sparegris(); s.leggTilFoerst(100); s.leggTilFoerst(400); s.leggTilSist(1470); s.leggTilFoerst(100); s.leggTilFoerst(300); s.leggTilSist(100); System.out.println(s.hentFoerst()); System.out.println(s.hentSist()); System.out.println(s.hentAntall()); System.out.println(s.fjernFoerst()); System.out.println(s.fjernSist()); System.out.println(s.hentFoerst()); System.out.println(s.hentSist()); System.out.println(s.hentAntall()); System.out.println(s); SparegrisGenerisk s2 = new SparegrisGenerisk<>(); s2.leggTilFoerst(true); s2.leggTilSist(true); s2.leggTilSist(false); s2.leggTilFoerst(false); s2.leggTilFoerst(true); s2.leggTilSist(true); System.out.println(s2); } }