What are the advantages of inheritance?
Answers were Sorted based on User's Feedback
Answer / maragatham
inheritance helps to avoid writing code again and again.
it helps us to reduce the size of the code
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / george tsiga
1. Promotes reusability
2. Helps in better abstraction, thereby resulting in better
design.
3. Eliminates duplication of code
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / parna mazumdar
1.Reusability
2.Extendibility
3.Maintainability
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / raju
inheritence provides less code.and we can add the further enhancement of code with out modifying the parent class.and with this it provides code reusebulity.
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / siddhartha
The advantage of inheritance are:
1.Reusability
2.Code sharing
3.Software component
4.Information hiding
5.Rapid prototyping
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / haneet kaur
1. Reuse of existing code and program functionality: the program does not have to write and re-write the same code for logically same problem.
2. Less labour intensive: the programmers do not have to rewrite the same long similar program just because the application to be developed has slightly different requirements.
3. Well organised. the object are well organised in a way that they follow some hierarchy.
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / krish
fine all the above answers saying inheritance is mainly used to reusing the code so development time reduses.ok fine
to reuse the already created class we can use reference of that class directly. then why we go for the inheritance?.
i think by using object references complexity will increases.It creates confusion to users.
and by creating reference another object is created. so memory wastage here.
i don't know exactly .....If there r any answers please post.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / qureshi s.
In inheritance , we acquire or inherite the properties of
existing class. i.e here reusability is occur which means
that we can add the additional feauters into an existing
class without modifying it.
inheritance saves the programmer time and effort. written
can be reused in various situations as needed.
It Increases Program Structure which results in greater
reliability.
| Is This Answer Correct ? | 0 Yes | 0 No |
hi, this is raju,iam studying b.tech 2nd year,iam want know about group1 and group2 details, and we can studying without going to any instutions? please help me.
Write a program to reverse a string using recursive function?
What does and I oop mean in text?
write a c++ program to find maximum of two numbers using inline functions.
i ahve v low % in 12th n BSC which is aroun 50 coz science was imposed on me......nw m doin MCA n my aggregate in above 74%,what shud i say if asked about low previous percentage??????
why constructor cannt be declar virtually? why destructor cannt be overloaded?
This program numbers the lines found in a text file. Write a program that reads text from a file and outputs each line preceded by a line number. Print the line number right-adjusted in a field of 3 spaces. Follow the line number with a colon, then one space, then the text of the line. You should get a character at a time and write code to ignore leading blanks on each line. You may assume that the lines are short enough to fit within a line on the screen. Otherwise, allow default printer or screen output behavior if the line is too long (i.e., wrap or truncate). A somewhat harder version determines the number of spaces needed in the field for the line numbers by counting lines before processing the lines of the file. This version of the program should insert a new line after the last complete word that will fit within a 72-character line.
which is best institute to learn c,c++ in ameerpet hyderabad
what does exactly the linker do?
What is public, protected, private?
What is abstraction encapsulation?
What is difference between class and object with example?