...

/

Challenge 1: Implement an Abstract Method in a Base Class

Challenge 1: Implement an Abstract Method in a Base Class

Can you implement an abstract method of a base class? A solution is placed in the "solution" section to help you, but we would suggest you try to solve it on your own first.

Problem Statement

There is a Book class which has an abstract method getDetails(), a parameterized constructor, and three protected fields:

  • name
  • author
  • price

Write a MyBook class that inherits from the Book class ...