All pastes #415433 Raw Edit

Miscellany

public text v1 · immutable
#415433 ·published 2007-03-29 16:57 UTC
rendered paste body
/*++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Dieses Programm wurde erstellt von                 +
+ Dominik Neukamm, Daniel Lang und Benjamin Kohler   +
+ Gruppenschlüssel: "163267"                         +
+ Hinweis: java -Dfile.encoding=cp850 ... => Umlaute +
++++++++++++++++++++++++++++++++++++++++++++++++++++*/

import java.io.*;

class Buch {
  private String titel;
  private String autor;
  private int isbn = 0;
  
  public void setTitel(String title) {
    this.titel = title;
  }
  public String getTitel() {
    return titel;
  }
  public void setAutor(String author) {
    this.autor = author;
  }
  public String getAutor() {
    return autor;
  }
  public void setISBN(int number) {
    this.isbn = number;
  }
  public int getISBN() {
    return isbn;
  }
  public static String inputAutor() {
    String eingabe = "";
    try {
      BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
      eingabe = in.readLine();
    }
    catch (Exception exc) {
      System.out.println("Es trat ein Fehler beim Einlesen eines Strings auf!");
    }
    return eingabe;
  }
  public static int inputISBN() {
    int isbn;
    try {
      BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
      isbn = Integer.parseInt(in.readLine());
    }
    catch (Exception exc) {
      System.out.println("Es trat ein Fehler beim Einlesen eines Integers auf!");
    }
    return isbn;
  }
}