tut05_2009_sol - none can define the calculation of area....

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

View Full Document Right Arrow Icon
EE3206/EE5805 Java Programming & Application Tutorial 5 – Generic Programming Q3. By defining the abstract class Shape , you provide a partially filled template for other classes to extend. Its subclasses do not need to repeat the jobs of declaring the data fields and the associated methods. It is impossible to implement the method getArea in Shape as shape is an abstract idea. Without specifying the features of a concrete shape such as radius, width or height,
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: none can define the calculation of area. Q6. The interface enables a class to extend its behavior without affecting its own inheritance hierarchy. Besides, the interface defines a contract between server (who provides the service) and client (who use the service). Dependency can be reduced (decoupling) and implementation details can be hidden from users....
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