Ich möchte das Objekte(Schüler) in eine bestimmte Objekt(klasse gehen) wie mache ich
das?
Soviel hab ich schon
public Student(String name, int age, char sex,Room room) {
this.name = name;
this.age = age;
this.sex = sex;
this.numberOfStudents++;
this.room = room;
}
und
public Room(int floor, int number, int size){
this.floor = floor;
this.number = number;
this.size = size;}
bitte um antworten