Using Java, write a program that creates a class to represent abook. A book may be opened or closed and can be moved from one ofthose states to the other. If it is open you may read it, otherwiseyou will only be able to admire its cover art. When the book’s nameis printed out, instead of the memory address, I would like to beable to see its title and then read it. Feel free to give the classthe title and text of your favorite book.
Sample output: Youclosed the book.
You have opened the book.
The title of the book is
OR
OR