Question: Write Java Code for: Add a new class, LibraryCollection. This class will have -- a private instance variable that contains a collection of all your

Write Java Code for:

Add a new class, LibraryCollection. This class will have --

a private instance variable that contains a collection of all your books

a private instance variable that contains a collection of all of your movies

a constructor that calls private methods to initialize your books and movies collection

a method to add a book to your books collection

a method to add a movie to your movies collection

a method to remove a book from your books collection

a method to remove a movie from your movies collection

a method to search for and return a book from your books collection by reference number

a method to search for and return a movie by reference number

a method (or methods) that search for books by author and/or title or any combination of attributes. Should return an array list of books that meet the criteria. For example you want to search for any book written by Lee Childs.

a similar method to search for movies.

Finally, you need to write a class that can do the following by asking a user to enter data through the Blue J terminal window. You can invoke a method on this class to get started -- for example you might have a method public void returnABook() that will ask you to enter the reference number of the book to be returned, then update the books status in your collection. In addition, this class should be able to do the following --

Add a book or movie through System in that is the method should ask a user for the information on a book or a movie, read in the user responses and add a book or movie to your collection.

Allow a friend to borrow a book or movie.

Allow a friend to return a book or movie.

Print out all books and movies that are currently out on loan.

Delete a book or movie from your collection

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 Databases Questions!