What are the advantages of inheritance?

Answer Posted / k.kirankumar

1.reusability(that is we can use same code in different
versions(class etc..)
2.avoids tyoing of code again and again(code compatability)
3.cost(in sense their no need compile same code for many
number times regardless of its usage)
4.maintance is very because the in inheritance formart is
in the modules so that it is easy to find the errors in
the small module instead of finding errors in many no.of
lines at time
5.the bove feature will reduce testing effort.

Is This Answer Correct ?    11 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between class and object with example?

566


What language is oop?

597


What is oops with example?

566


what is different between oops and c++

2004


officer say me - i am offered to a smoking , then what can you say

1586






What is the purpose of enum?

585


What is the difference between inheritance and polymorphism?

594


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.

1643


Hi friends I have experience of 6 months in website design and maintanence. Now i am looking for other IT jobs.. to switch platform. please post any interview you know in chennai.

1794


given a set based questions and 5 questions based on it next data sufficiciency questions 2 and 2/3 english sentence completion with options very easy and 2 synononmys paragraph with 10 questions 10 minutes replace =,-,*,% with -,%,+,* type questions 5 3 questions lik following itssickhere itssickthere itssickhere istsickhere which is nt alike the others very easy

2150


Why do we use class?

638


Which type does string inherit from?

618


What is polymorphism in oops with example?

533


c++ program to swap the objects of two different classes

1767


How do you explain polymorphism?

597