Extending Interfaces

 <  Day Day Up  >  

Interfaces are similar to classes with respect to inheritance. An interface can extend an interface to add functionality. In our previous example, we used a print interface and an application interface. We could have extended the application interface to add the printing functionality. We would do this by extending the application interfaces, as shown in Listing 6.9.

Listing 6.9. Extending Interfaces for the LoanCalc Example
 interface Printable{       function print(); } interface Application extends Printable{       function fillOut();       function sign();       function submit(); } 
 <  Day Day Up  >  

Object-Oriented Programming with ActionScript 2.0
Object-Oriented Programming with ActionScript 2.0
ISBN: 0735713804
EAN: 2147483647
Year: 2004
Pages: 162

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net