package Uebung2_IO.loesung3; //man muss hier Cloneable implementieren public class Zaehler implements Cloneable { private String zahelerort; private Verbraucher verbraucher = null; private int zaehlerstand; public Zaehler(String zahelerort, Verbraucher verbraucher, int zaehlerstand) { this.zahelerort = zahelerort; this.verbraucher = verbraucher; this.zaehlerstand = zaehlerstand; } public String getZahelerort() { return zahelerort; } public void setZahelerort(String zahelerort) { this.zahelerort = zahelerort; } public Verbraucher getMeinVerbraucher() { return verbraucher; } public void setVerbraucher(Verbraucher verbraucher) { this.verbraucher = verbraucher; } public int getZaehlerstand() { return zaehlerstand; } public void setZaehlerstand(int zaehlerstand) { this.zaehlerstand = zaehlerstand; } @Override public Zaehler clone() throws CloneNotSupportedException { return (Zaehler) super.clone(); } }