Question: Make a package for each of the question: Create a class whose objects are book collection. A book collection should keep a String array (
Make a package for each of the question:
Create a class whose objects are book collection. A book collection should keep a
String array set the size of book title and the number of books in the collection.
It also should support the following methods:
a addBookString add one book to the collection
i when the array is full, throw an exception
BookCollectionFullException
b removeBook remove one book from the bag based on the given title
i when the collection is empty, throw an
exceptionBookCollectionEmptyException
c getBooksCount return the number of books in the bag
You should create the two exceptions listed above by yourself.
Inside main method, create a book collection object, and test the methods.
Write a program to read the contents from three given files and write them to one
file, and also add line number.
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
