Hallo,
hier kurz die Struktur:
In ControllerA wird das Hauptfenster erstellt. ControllerB und ControllerC sind für Komponenten
des Hauptframes zuständig. Nun ist es so, da eine bestimmte Anzahl an Methoden bei den Controllern c,b
gleich sind. Wie kann ich jetzt eine doppelte implementierung am besten verhindern?
Soll ich die Methoden in ControllerA implementieren, oder gibt es noch ne andre Möglichkeit?
Gruß
dwn8
hier kurz die Struktur:
Code:
public class ControllerA() {
private ControllerB b;
private ControllerC c;
public ControllerA() {
b = new ControllerB();
c = new ControllerC();
}
}
In ControllerA wird das Hauptfenster erstellt. ControllerB und ControllerC sind für Komponenten
des Hauptframes zuständig. Nun ist es so, da eine bestimmte Anzahl an Methoden bei den Controllern c,b
gleich sind. Wie kann ich jetzt eine doppelte implementierung am besten verhindern?
Soll ich die Methoden in ControllerA implementieren, oder gibt es noch ne andre Möglichkeit?
Gruß
dwn8