tut04_2009_r1_sol - This capability is known as dynamic...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
EE3206/EE5805 Java Programming and Applications Tutorial 4 – Using Inheritance and Polymorphism Q2. Proper use of inheritance increases the reusability of code and reduces the complexity of a program. A method can be coded once and used by all subclasses. The subclass only needs to implement the difference between itself and its parent. Q4. A method may be implemented with different versions in several subclasses. The JVM dynamically determines the correct implementation to be invoked in runtime.
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: This capability is known as dynamic binding. It can be very useful when programming with different instances that share the same parent. In this case, one may write program that generically handles these instances which inherit common behaviors from their parent. In other words, a generic program only interacts with the abstraction of these instances....
View Full Document

This note was uploaded on 04/20/2010 for the course ELECTRONIC EE3206 taught by Professor Tingchiwang during the Spring '10 term at École Normale Supérieure.

Ask a homework question - tutors are online