Answer the question
In order to leave comments, you need to log in
Relationship between Student (is-a) Person and relationship Group (has-a) Student?
public class Student extends Person{
Group group;
}
public class Group{
Student student;
}
Answer the question
In order to leave comments, you need to log in
Yes
public class Student{just what the hell is this, why are there two Student classes
Group group;
}
Good afternoon.
Student is a Person is an association.
Group has a Person is an aggregation. It is not a composition, since a student can exist separately from the group.
https://habr.com/ru/post/150041/
https://javarush.ru/groups/posts/1967-otnoshenija-...
https://habr.com/ru/post/511798/
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question