please help me by sending ...the coding of the program........
Answers
Answer:
import java.io.*;
public class Library {
int acc_num;
String title;
String author;
InputStreamReader in = new InputStreamReader(System.in);
BufferedReader bf = new BufferedReader(in);
public void input()throws Exception{
System.out.print("Enter accession number: ");
acc_num = Integer.parseInt(bf.readLine());
System.out.print("Enter the title of the book: ");
title = bf.readLine();
System.out.print("Enter author: ");
author = bf.readLine();
}
public void compute()throws Exception{
System.out.print("Enter the number of days late: ");
int late = Integer.parseInt(bf.readLine());
int fine = late * 2;
System.out.println("Fine: " + fine);
}
public void display(){
System.out.println("Format: accession number title author\n");
System.out.println(acc_num + " "+ title + " " + author);
}
public static void main(String args[]) throws Exception{
Library l = new Library();
l.input();
l.compute();
l.display();
}
}
Answer:
can I be your friend
please
number.....