Question: Question 3 [ 2 9 marks ] You are building a library management system. An object of the Book class represents each book in the

Question 3
[29 marks]
You are building a library management system. An object of the Book class represents each book in the library. Declare an array of Book objects to store information about five different books.
3.1 The following is a Book class and an incomplete program that declares an array of Book objects to store information about five different books. Provide the missing code that displays the book list.
(4 marks)
\table[[1.,public class Book {],[2.,private String title;],[3.,private String author;]]
3
HSYD100-1-Jan-Jun2024-FA2-OD-V.2-08112023
\table[[4.,public String getTitle(){],[5.,return title;],[6.,}],[7.,public void setTitle(String title){],[8.,this.title = title;],[9.,}],[10.,public String getAuthor(){],[11.,return author;],[12.,}],[13.,public void setAuthor(String author){],[14.,this.author = author;],[15.,}],[16.,public Book(String title, String author){],[17.,this.title = title;],[18.,this.author = author;],[19.,}],[20.,}]]
 Question 3 [29 marks] You are building a library management system.

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!