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 10) of book title and the number of books in the collection.
It also should support the following methods:
a. addBook(String)- 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
exception(BookCollectionEmptyException)
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.
Make a package for each of the question: Create a

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!