javascript
Brief description  about Online courses   join in Online courses
View Saranya  K 's Profile

inheritance

I am not clear with the concept of inheritance.. something s confusing me. the new class RACINGCAR is the inherited class as mentioned in t tutorial but if it is inherited fully then wat is t difference between the class CAR and the RACINGCAR??
Asked by Saranya K | Jul 15, 2012 |  Reply now
Replies (2)
View saranya k 's Profile
thank Yu kanhiya. Nw its clear..
Jul 16, 2012
View  's Profile
Hi,

Fully inherited means, it contains all of the properties of the parent class and it will have other properties as well.

for example: Car and racing car both will have steering, four wheels etc but racing car will have some special properties like its aerodynamic design, it's NITRO engine, It's top speed .

And ofcourse both are cars but Racing car is different someway.

Take other example of Animals class, Dog and Lion, both are animals but they have certain special properties.


I hope now you will be able to understand the concept.

Kanhiya Deswal
Jul 16, 2012