import java.io.*;
public class Library{
int acc_num,edays,fine;
String author, title;
BufferedReader buff=new BufferedReader(new InputStreamReader(System.in));
public void input()throws IOException{
System.out.println("Enter the Accssion Number:- ");
acc_num=Integer.parseInt(buff.readLine());
System.out.println("Enter the Author Name:- ");
author=buff.readLine();
System.out.println("Enter the Title of the Book:- ");
title=buff.readLine();
System.out.println("Enter the Extra Days:- ");
edays=Integer.parseInt(buff.readLine());
}
public void compute(){
fine=edays*2;
}
public void display(){
System.out.print("Acc. No.\tTitle\t\tAuthor\t\tFine");
System.out.print("\n"+acc_num+"\t\t"+title+"\t\t"+author+"\t\t"+fine);
}
public static void main(String[] args)throws IOException{
Library obj=new Library();
obj.input();
obj.compute();
obj.display();
}
}
public class Library{
int acc_num,edays,fine;
String author, title;
BufferedReader buff=new BufferedReader(new InputStreamReader(System.in));
public void input()throws IOException{
System.out.println("Enter the Accssion Number:- ");
acc_num=Integer.parseInt(buff.readLine());
System.out.println("Enter the Author Name:- ");
author=buff.readLine();
System.out.println("Enter the Title of the Book:- ");
title=buff.readLine();
System.out.println("Enter the Extra Days:- ");
edays=Integer.parseInt(buff.readLine());
}
public void compute(){
fine=edays*2;
}
public void display(){
System.out.print("Acc. No.\tTitle\t\tAuthor\t\tFine");
System.out.print("\n"+acc_num+"\t\t"+title+"\t\t"+author+"\t\t"+fine);
}
public static void main(String[] args)throws IOException{
Library obj=new Library();
obj.input();
obj.compute();
obj.display();
}
}
Comments