Tuesday, 10 September 2013

The Benefits of Inheritance

Software Reusability-- Inheritance allows you to modify or extend a package somebody gave you without touching the package's code
–Saves programmer time:
–increase reliability, decrease maintenance cost, and,
–if code sharing occurs, smaller programs.

Consistency of Interface--An overridden function must have the same parameters and return type:
–Saves user time: Easier learning, and easier integration.
–guarantee that interface to similar objects is in fact similar.

Polymorphism-- Different objects behave differently as a response to the same message.


No comments:

Post a Comment

Blog Archive