I have a Library class which has a librarian and list of book and Librarian class which has an id and addBook method. The librarian class can add books in the library. What will be the correct way to do this?
public class Library
{
private Librarian librarian;
private List<Book> books;
}
public class Librarian
{
private int id;
public boolean addBook(Book b);
}
Aucun commentaire:
Enregistrer un commentaire