/* * Lehrstuhl Softwaretechnologie, TU Dresden, Datei Bibliothek.java * * Bibliothek-Klasse implementiert eine Bibliothek, die B¸cher aufnehmen kann */ public class Bibliothek { private Buch [] meineBuecher; private int anzahl; public Bibliothek() { //Konstruktor meineBuecher = new Buch[10]; anzahl = 0; System.out.println("Hallo, ich bin eine Bibliothek," + "die 10 Buecher aufnehmen kann!"); } public void aufnehmen(Buch buch) { meineBuecher[anzahl] = buch; anzahl += 1; System.out.println("Ich habe das Buch " + buch + " aufgenommen!"); } public boolean suchen (String v) { boolean c; v = System.in.read(); //c.equals(buch1); return c; } }