Create a book class-stores the information


Assignment:

Complete Java code for the following beginner-level assignment:

Q: You run a small library. Ask the user to provide information for several books. The information must include the author, title and publisher of each book. Create a book class which stores the information and implements the following methods:

getAuthor() (returns author's name)

getTitle() (returns the title)

getPublisher() (returns the publisher of the book)

Finally print all the stored information to the user.

Tip 1: Remember the constructor.
Tip 2: You can use an arraylist.

This is how it should look like:

Do you want to input a new book (y/n)?

y

Author:

Jacob Smith

Book title:

Investment Banking

Publisher:

Oxford Press

Do you want to input a new book (y/n)?

y

Author:

Mary Dickins

Book title:

Advanced Econometrics

Publisher:

London Publishing House

Do you want to input a new book (y/n)?

n

The library contains:

2 books

Books:

Jacob Smith, Investment Banking, Oxford Press

Mary Dickins, Advanced Econometrics, London Publishing House

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Create a book class-stores the information
Reference No:- TGS01934070

Now Priced at $25 (50% Discount)

Recommended (98%)

Rated (4.3/5)