< 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 Exampleinterface Printable{ function print(); } interface Application extends Printable{ function fillOut(); function sign(); function submit(); } |
< Day Day Up > |