Hi,
Till now I have never thought as Inheritence will also have some disadvantages. But I tried to find the other side of complexity of inheritance and I get to know many other details which you might be knowing but have never noticed it.
iki/Fra...
Hope this little thing might have given you a chance to look at the world of oops in a different manner.
Till now I have never thought as Inheritence will also have some disadvantages. But I tried to find the other side of complexity of inheritance and I get to know many other details which you might be knowing but have never noticed it.
- Inheritance results in a very tight binding between a superclass and its subclasses.
- Removing or swapping out a superclass will usually break subclasses. Subclasses are entirely dependant on their superclass to function effectively.
- It's inflexible. You are burdened by methods and behavior defined in a more general superclass, making down-the-line changes and customization difficult. Decisions made early on haunt the entire class hierarchy. See the fragile base class problem. [1]
- Inheritance relationships generally can't be altered at runtime.
- In many OOP languages, you can only inherit from a single class without introducing the problems associated with multiple inheritance. This can be restrictive. For example, if you have a Person class, with the subclasses Student and Employee. What if you have a person who is both a Student and an Employee?
Hope this little thing might have given you a chance to look at the world of oops in a different manner.
1 comment:
Harrah's Reno Hotel and Casino - MapyRO
Find Harrah's Reno 충청남도 출장샵 Hotel and 김포 출장안마 Casino, 용인 출장마사지 Reno, 파주 출장샵 NV, 수원 출장마사지 United States, ratings, photos, prices, expert advice, traveler reviews and tips, and more information from
Post a Comment