OOP: Books

  • 16
  • Locked
In this task, we will create books written by the earthly authors Mark Twain and Agatha Christie. Using the MarkTwainBook and AgathaChristieBook classes, naturally, which inherit Book. You need to implement all the abstract methods in these classes. And in the parent class, implement the getOutputByBookType method.
You can't complete this task, because you're not signed in.
Comments (8)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
Amo programmare
Level 29 , Italy
Expert
14 February, 12:35
This task really helps to understand constuctors and their order when using class inhertiance.
Олег Байбула
Level 32 , Ukraine
Expert
14 January, 05:26
Good task, but it was easy for me.
LuisRC
Level 39 , Gijón, Spain
14 February 2022, 16:16
Really a tough task to me. It took to me two days of reading and debugging to see what happened inside. A really nice task to learn about "this", "super" and OOP. 👍
Jurij Thmsn
Level 29 , Flensburg, Germany
4 March 2021, 13:59
really nice task. It helped me to understand "this" and inheritance much better!
BlueJavaBanana
Level 37
6 May 2020, 15:59
It should be noted that your constructor for the Mark Twain and the Agatha Christie classes should invoke the parent class constructor e.g. super("Mark Twain") and also initialize the title for the child class e.g. this.title = parameter. This really isn't clear in the description.
Andrei
Level 41
4 December 2020, 12:39
Yes, very true!
IVAN
Level 17 , Milan, Italy
5 February 2020, 03:27
Please, can Someone Help me!?
Roman
Level 41
5 February 2020, 08:14
Please refer to Help section at our course.