ICSE Class 10 - Computer Application Important Program (15 Marks)
Program 1- Define a class called Library with the following description: Instance variables/data members: Int acc_num – stores the accession number of the book String title – stores the title of the book stores the name of the author Member Methods: (i) void input() – To input and store the accession number, title and author. (ii)void compute – To accept the number of days late, calculate and display and fine charged at the rate of Rs.2 per day. (iii) void display() To display the details in the following format: Accession Number Title Author Write a main method to create an object of the class and call the above member methods. Solution - public class Library { int acc_num; String title; String author; public void input() throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); ...