From 0cdfee8b862314c077622398b0584fa7481cf8f9 Mon Sep 17 00:00:00 2001 From: Denys Konovalov Date: Fri, 27 Sep 2024 10:54:23 +0200 Subject: [PATCH] Bibliothek/Bibliothek.java aktualisiert --- Bibliothek.java => Bibliothek/Bibliothek.java | 56 +++++++++---------- 1 file changed, 28 insertions(+), 28 deletions(-) rename Bibliothek.java => Bibliothek/Bibliothek.java (95%) diff --git a/Bibliothek.java b/Bibliothek/Bibliothek.java similarity index 95% rename from Bibliothek.java rename to Bibliothek/Bibliothek.java index 5de6e2f..74853db 100644 --- a/Bibliothek.java +++ b/Bibliothek/Bibliothek.java @@ -1,28 +1,28 @@ -import java.util.ArrayList; - -public class Bibliothek { - private ArrayList books = new ArrayList<>(); - - public void buchHinzufuegen(Buch buch) { - books.add(buch); - } - - public Buch buchSuchen(String isbn) { - for (Buch buch : books) { - if (buch.ISBN.toLowerCase().equals(isbn.toLowerCase())) { - return buch; - } - } - - return null; - } - - public void alleBuecherAnzeigen() { - for (Buch buch : books) { - buch.buchInfo(); - System.out.println("-".repeat(10)); - } - } - - -} +import java.util.ArrayList; + +public class Bibliothek { + private ArrayList books = new ArrayList<>(); + + public void buchHinzufuegen(Buch buch) { + books.add(buch); + } + + public Buch buchSuchen(String isbn) { + for (Buch buch : books) { + if (buch.ISBN.toLowerCase().equals(isbn.toLowerCase())) { + return buch; + } + } + + return null; + } + + public void alleBuecherAnzeigen() { + for (Buch buch : books) { + buch.buchInfo(); + System.out.println("-".repeat(10)); + } + } + + +}