2025-03-22 23:52:51 +03:00
|
|
|
package classesTemplate;
|
|
|
|
|
2025-03-27 15:27:38 +03:00
|
|
|
import java.util.ArrayList;
|
|
|
|
|
2025-03-22 23:52:51 +03:00
|
|
|
public class Library {
|
2025-03-27 15:27:38 +03:00
|
|
|
public ArrayList<Book> books = new ArrayList<Book>();
|
|
|
|
public ArrayList<Member> members = new ArrayList<Member>();
|
|
|
|
|
|
|
|
public void addBook(Book book) {
|
|
|
|
books.add(book);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
public void addMember(Member member) {
|
|
|
|
members.add(member);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
public void displayAvailableBooks() {
|
|
|
|
if (books.isEmpty()) {
|
|
|
|
|
|
|
|
System.out.print("Kütüphane boş!");
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
for (int i = 0; i < books.size(); i++) {
|
|
|
|
|
|
|
|
books.get(i).displayInfo();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
public void displayBook(Book book) {
|
|
|
|
|
|
|
|
book.displayInfo();
|
|
|
|
|
|
|
|
|
|
|
|
}
|
2025-03-22 23:52:51 +03:00
|
|
|
|
|
|
|
}
|