Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,155,506 members, 7,826,909 topics. Date: Monday, 13 May 2024 at 10:47 PM

Prefer Composition Over Inheritance [opinion] - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Prefer Composition Over Inheritance [opinion] (698 Views)

Java Vs C# Which Do You Prefer? / Prefer Composition Over Inheritance [opinion] / Java Devs, Which Do You Prefer? Eclipse Or Netbeans? (2) (3) (4)

(1) (Reply) (Go Down)

Prefer Composition Over Inheritance [opinion] by adrainuche(m): 2:44pm On Aug 15, 2014
So we must have read about the GOF .... And dis was a very big debate in one of my classes... Altough i may have reasons to dispute this but its an idea that has been proven to solve pronlems what your stake ?
Re: Prefer Composition Over Inheritance [opinion] by spikesC(m): 2:46pm On Aug 15, 2014
Pls explain further
Re: Prefer Composition Over Inheritance [opinion] by iyb(m): 9:41pm On Aug 17, 2014
Has a Relationship is easy to implement but Is a relationship is just beautiful it prevents redundant code and is just easy to understand with real life entities a cow is an animal, a dog is an animal so in my opinion inheritance is much better

1 Like

Re: Prefer Composition Over Inheritance [opinion] by adrainuche(m): 11:01am On Aug 18, 2014
iyb: Has a Relationship is easy to implement but Is a relationship is just beautiful it prevents redundant code and is just easy to understand with real life entities a cow is an animal, a dog is an animal so in my opinion inheritance is much better
They are so many problems with inheritance, Class Explosion the Ripple Effect as so on ..
Re: Prefer Composition Over Inheritance [opinion] by danvery2k6(m): 9:36pm On Aug 18, 2014
adrainuche:
They are so many problems with inheritance, Class Explosion the Ripple Effect as so on ..
Could you explain that? Cos I've never had problem with inheritance. interfaces and abstract classes help make it just awesome. so I don't get what you mean by " class explosion". Could you just explain some more?

(1) (Reply)

Whizapp Is Here! / Library Codes 2015 For VB.NET Programming Language / Is The Programming Challenge Series Dead ?

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 8
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.