Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package progettolibro;
- import java.io.*;
- import java.lang.*; // libreria utilizzata per le stringhe
- public class libro {
- private String autore;
- private String titolo;
- private int NumPagine;
- private boolean prestato;
- //costruttore
- public libro(){
- this.autore="";
- this.titolo="";
- this.NumPagine=0;
- this.prestato=false;
- }
- public void LeggiDati(int i){
- InputStreamReader input = new InputStreamReader (System.in);
- BufferedReader tastiera = new BufferedReader (input);
- String appoggio ="";
- System.out.println("Inserisci i dati del libro"+(i+1));
- System.out.println("Inserici il titolo");
- try {
- appoggio = tastiera.readLine();
- }
- catch (IOException e){System.out.println("Errore di inserimento dati");}
- NumPagine = Integer.valueOf(appoggio).intValue();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement