Question: Write a class Book to model books. This book object will have two instance variables: a title (String) and authors (Array of Strings). Write a

Write a class Book to model books. This book object will have two instance variables: a title (String) and authors (Array of Strings). Write a default constructor which sets title to Test and authors to null. Write a constructor receiving values for these fields. Lastly, implement getter and setter methods for your instance variables. In Book, write a method bookToString, which returns a string with the books information (in the format below. Use \ to have a quote character in a string. The Lord of the Rings by J.R.R. Tolkien Nixonland by Rick Perlstein Berenstain Bears by Stan Berenstain & Jan Berenstain

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!