We create a Book class with private fields title, author and year of publication.
Then we create an inheriting class Author, which has an additional field author.
We use the constructor of the base class (Book) in the constructor of the derived class (Author).
In the Main class we create an object of the Author class and print
information about the book on the screen using access methods (getters).