Forum     

Go Back   Digit Technology Discussion Forum > Software > Programming
Register FAQ Calendar Mark Forums Read

Programming The destination for developers - C, C++, Java, Python and the lot


Reply
 
LinkBack Thread Tools Display Modes
Old 18-12-2011, 05:28 PM   #1 (permalink)
Right Off the Assembly Line
 
Join Date: Aug 2011
Posts: 13
Default What is the use of Inheritance ?


What are the use of Inheritance? And what is the different between them and simple classes.
yo01 is offline   Reply With Quote
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 18-12-2011, 07:24 PM   #2 (permalink)
Wise Old Owl
 
clmlbx's Avatar
 
Join Date: Aug 2006
Location: Indore
Posts: 1,687
Default Re: What is the use of Inheritance ?

check this video..that is very basic but best and simplest I have ever seen

Inheritance

"Buckys c++" series is very basic and simplest.. just awesome
__________________
Athlon II X4 635 @ 2.9Ghz   Gigabyte GA-MA785GMT-US2H   Kingston 2x2 Gb 1333Mhz DDR3   WDC 500Gb Green   Palit GTS 250 512mb   Tagan 500W   Samsung B2030   Lg DVD Writer
clmlbx is online now   Reply With Quote
Old 19-12-2011, 10:12 AM   #3 (permalink)
Fullbring
 
Zangetsu's Avatar
 
Join Date: Jan 2008
Location: Soul Society
Posts: 5,523
Default Re: What is the use of Inheritance ?

^^thanx for the video...

Inheritance is basic concept in OOPs & programming
__________________
I'm the One you've been Waiting for...
Zangetsu is offline   Reply With Quote
Old 19-12-2011, 01:10 PM   #4 (permalink)
Wise Old Owl
 
abhidev's Avatar
 
Join Date: Sep 2009
Posts: 1,624
Default Re: What is the use of Inheritance ?

so that you can reuse and avoid replication of code...
__________________
Core 2 duo E4500 2.2gHz , ASUS P5GCMX , 3GB Transcend , Corsair VX 550w, MSI R5770 HAWK Edition 1GB, CM HAF-922, LG W2243T 21.5" LCD, I-Ball Baton
abhidev is online now   Reply With Quote
Old 20-12-2011, 01:33 AM   #5 (permalink)
Blu For Life Hail Chelsea
 
clinton's Avatar
 
Join Date: Apr 2008
Location: |-|e££'s G@T€
Posts: 155
Default Re: What is the use of Inheritance ?

An eg. would be-
U create a class Personal Details which has members such as name,bday,address,etc.
Now u can use these fields in sub classes such as Student,employee,etc. as they too require the above mentioned fields.
Thus it prevents creating diffrnt name,etc field for everx new class.

Hope u understood...
clinton is online now   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


 
Latest Threads
- by Charan
- by Sarath
- by clmlbx

Advertisement




All times are GMT +5.5. The time now is 12:37 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2