Suppose I have “one to many” relationship between 2 classes: library and book (a library have one or many books)
Is it correct if I expressed it in this way :
class Library { List<book> books; //... } class Book { Library library //... }
I mean that is it correct if I translated the relation into both classes? Or must I choose: either I give the library class a reference to their books or I give the book the reference to its library?