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...

Assuming that x and y are equal to 3 and 2, respectively, after the statement x -= y executes, the values of x and y will be:

a. x: 5; y: 3 b. x: 3; y: -1 c. x: 3; y: 5 d. x: 1; y: 2

Computer Science & Information Technology

When data is stored in fixed length fields, data that extends beyond the fixed size ____.

A. generates an operating system error B. is truncated C. is broken up and stored in more than one field D. combines multiple fields to accommodate the data

Computer Science & Information Technology