Question: Book Manipulation The district central library needs an application to store book details of their library. The clerk who has all the rights to add
Book Manipulation
The district central library needs an application to store book details of their
library. The clerk who has all the rights to add a new book,search for any
book,display the book details and should update the count of total number of
books.
You are provided with a Book with the following private attributes:
int isbnno
String bookName
String author
Needed getters and setters are written.
Create a class Library with the following private attribute:
ArrayList bookList new ArrayList;
Also provide the necessary setter and getter methods.
Include the following public methods:
void addBookBook bobj This method should add the book object to the
booklist.
boolean isEmpty This method should return true if the booklist is
empty else return false.
ArrayList viewAllBooks This method should return the list of
books maintained in the library.
ArrayList viewBooksByAuthorString author This method should
return a list of books written by the author passed as argument. When you
display an empty list it should print the message "The list is empty".
int countnoofbookString bname this method should return the count of
books with the name passed as argument.
Write a Main class to test the above functionalities.
Sample Input and Output :
Add Book
Display all book details
Search Book by author
Count number of books by book name
Exit
Enter your choice:
Enter the isbn no:
Enter the book name:
Java
Enter the author name:
Bruce Eckel
Add Book
Display all book details
Search Book by author
Count number of books by book name
Exit
Enter your choice:
Enter the isbn no:
Enter the book name:
C
Enter the author name:
Eric Nagler
Add Book
Display all book details
Search Book by author
Count number of books by book name
Exit
Enter your choice:
This study resource was
shared via CourseHero.com
Enter the author name:
Henry
None of the book published by the author Henry
Add Book
Display all book details
Search Book by author
Count number of books by book name
Exit
Enter your choice:
Enter the author name:
Eric Nagler
ISBN no:
Book name: C
Author name: Eric Nagler
Add Book
Display all book details
Search Book by author
Count number of books by book name
Exit
Enter your choice:
write in python code and pseducode on this task how is work into the system and need to use D array
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
