abstract class Firkant { protected int a; protected int b; protected int c; protected int d; public Firkant(int a, int b, int c, int d) { this.a = a; this.b = b; this.c = c; this.d = d; } public int omkrets() { return a+b+c+d; } // M? implementers i subklasser. public abstract int areal(); @Override public String toString() { return String.format(" med areal: %s Omkrets: %s", areal(), omkrets()); } }