Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
38.4k views
in Computer by (49.0k points)
closed by

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 String author — 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 the display the 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. 

No related questions found

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...