What are the benefits of inheritance and Object Oriented Programming?

What will be an ideal response?


The benefits are abstraction and code reuse: A general form of a class can
be defined. It contains common features of the several specialized versions that may
be defined and caused to inherit from the general form. This saves you the trouble of
writing identical code two or more times.
Though the text does not say this explicitly, inheritance and OOP better enable
modeling of problems within programs. The objects represent actors and the member
functions represent behavior of the actors. The data members are information the
actors must remember to carry out their prescribed behavior.

Computer Science & Information Technology

You might also like to view...

Which of the following describes a class that would be a good candidate for conversion to a template class?

a. A class which defines a new type of array b. A class which defines rational numbers c. A class which defines customers for a store d. All of the above

Computer Science & Information Technology

Which of the following is not a KeyListener method?

a. keyPressed. b. keyReleased. c. keyClicked. d. keyTyped.

Computer Science & Information Technology

A signal mask is a set of signals a process

A. is ignoring B. is blocking

Computer Science & Information Technology

A(n) ________ is a three character code after the period at the end of a filename that is used to designate the type of file represented

Fill in the blank(s) with correct word

Computer Science & Information Technology