Hallo Leute
also ich sitz jetzt schon eine weile an dem Problem der compiler spuckt immer wieder den selben fehlermeldung aus. "Cannot find symbol" es liegt am Kontruktor nur ich weiß nicht wieso das falsch sein sollte? Die aufgabe ist abzugeben also wird die Klasse BirthDay vom abgabesystem erstellt.
Mein Code bis jetzt:
Ich hoffe ihr könnt mir einen tipp geben
also ich sitz jetzt schon eine weile an dem Problem der compiler spuckt immer wieder den selben fehlermeldung aus. "Cannot find symbol" es liegt am Kontruktor nur ich weiß nicht wieso das falsch sein sollte? Die aufgabe ist abzugeben also wird die Klasse BirthDay vom abgabesystem erstellt.
Mein Code bis jetzt:
Java:
public class Birthday {
/*
* Instance variables
*/
final private String DATE_FORMAT = "d.m.yyyy";
private String name; // Name des Jubilars
private int day; // Tag des Geburtstages
private int month; // Monat des Geburtstages
private int year; // Jahr des Geburtstages
/*
* Constructors
*/
public Birthday(String name, int day, int month, int year) {
this.name = name;
this.day = day;
this.month = month;
this.year = year;
}
public Birthday(BirthDay bd) {
this.name = bd.getName();
this.day = bd.getDay();
this.month = bd.getMonth();
this.year = bd.getYear();
}
// hab auch schon versucht so auf die Instanzvariablen zuzugreifen
public Birthday(BirthDay bd) {
this.name = bd.name;
this.day = bd.day;
this.month = bd.month;
this.year = bd.year;
}
Ich hoffe ihr könnt mir einen tipp geben
Anhänge
Zuletzt bearbeitet: