0

what is the need of abstract classes/interfaces if they contain no information or any description of any methods?

why do we need to define something blank and redefine it again?? we could omit that and just define the methods we need in the derived class itself! In that way we won't need an abstract class/interfaces or inheritance even, in this case!! anyone please explain it's need... everyone says, it describes "runtime polymorphism" !! but keeping that aside, what's the real use?? any apps or places or concept where it is used in real? and does it helps in anyway from coding point of view??

15th Jan 2018, 3:17 PM
Atanu Sarkar
Atanu Sarkar - avatar
2 Antworten
+ 1
Its debating questions specially for those who comes from procedural languages. However design patterns solve most of the common problem which is total impossible if we didn't have interfaces and abstract classes. Design patterns have proven great advantages over the years in software industry and to have a good design pattern to follow we need abstraction and interfaces. Three could be more answer to your questions.
18th Jan 2018, 4:02 AM
Jagdish
Jagdish  - avatar
0
also interested. i feel like this is mostly good practice for vast projects.
15th Jan 2018, 3:28 PM
Vincent
Vincent - avatar