Practice with abstract classes | Level 3
Comments (19)
- Popular
- New
- Old
You must be signed in to leave a comment
TheLordJackMC a person at war with my demons
15 July 2021, 15:21
diego being a bachelor: haha id help but i need to do nothing
amigo trying to get a job: help
+1
ImDevin
31 May 2021, 15:26
just leaving my "footprint" to say "hey, there are peeps who are still working through these things." (last comment was from June 2020 :) These tasks are not too hard, but re-enforcing important concepts. kinda makes me wonder when CG is going to crank things up hard again! Happy coding! :)
+1
Mayu
16 June 2020, 03:41
I'm managing to work through all these abstract and interface problems, but I have no idea how it works.
Can anybody suggest good reference (books, articles) to understand this?
+6
Joshua
16 June 2020, 08:24
http://www.dblab.ntua.gr/~gtsat/collection/Java%20books/Bruce.Eckel.Thinking.In.Java.4th.Edition.Dec.2007.eBook-BBL.pdf
This book was written in 2006, so it only covers up to java 1.5/6. Bruce Eckel does a good job of ensuring every reader is able to understand the concepts. I have about 10 different core Java books and this one is my go to for when I am confused about a topic. The link above is to a pdf of the book. I would recommend purchasing the book so you can sit down and read when your not at your computer and using the pdf as a reference.(After all learning to programming is like learning a foreign language, immerse yourself in the language every chance you get!)
+6
Mayu
16 June 2020, 18:59
Thank you Joshua, exactly what I needed.
+1
Andrei
26 November 2020, 17:22
I'm in the same situation, but here's my thinking: maybe the information is too new, and we know it, it just hasn't settled in yet.
So maybe that is why we can work through the exercises but do no know how it works?
+1
Thomas Sixberry
9 February 2020, 18:00
These last 3 Levels are so easy they have made me feel as if I am pro. =)
+5
jamylam
7 January 2020, 12:17
I noted and learnt something very interesting in the last example. We want to use the getName method. But its in the abstract class Fox, which cannot be instantiated. Instead we created a BigFoxclass that inherits properties of the FoxClass. In main, we declared a Fox object but instantiate it with the child class BigFoxClass, so that we can use it to access the get name method which it inherits from its abstract parent class
+4
Felix
8 November 2019, 00:54
I don't really get how the Fox class can implement the Anmial interface without implementing the getColor method.
0
Ivan
2 December 2019, 09:45
The BigFox inherits Fox and Fox implements Animal getColor() (note, it reaches to the interface, but does not implement its method!). So, Fox doesn't implement Animal's getColor() directly, but in this case, BigFox does it.
So the Fox remains abstract while having Animal's getColor() unimplemented and leaving for down the road to a next class to implement it :)
The getColor() method is implemented by BigFox.
+4
Isaiah Burkes
23 December 2019, 16:31
I'm assuming that abstract classes don't need to implement methods of the interfaces that they inherit.
+3
Alexandru Ovcinicov
26 September 2019, 17:32
Nice Time solving !
0
Fa Yu
28 June 2019, 09:59
all easily done thanks to intellij, but still couldn't understand where and for what reason to use the static for class creation
+5
Muhammad Vahhaaj
10 July 2019, 05:51
static keyword is used to declare a variable, method or class "shared" it means all the objects have only one copy of that thing. static class is used inside the other class to separate it from that class so that the it does not belong to the objects of the class containing the static class.
+14
Bert Doe
25 April 2019, 20:22
lets keep going
+1
JeRiF94
18 April 2019, 16:53
DONE
+1