Create a Book class that has two accessors :
and two additional methods:
getTitle that returns: "Title: " + the instance title.getAuthor that returns: "Author: " + the instance author.and instantiate this constructor by creating 3 new books:
The name of the new hash instances pp, h, and wp, respectively.
For instance, if I instantiated the following book:
I would get the following properties and methods:
hp.title ➞ "Harry Potter"
hp.author ➞ "J.K. Rowling"
hp.get_title ➞ "Title: Harry Potter"
hp.get_author ➞ "Author: J.K. Rowling"