Java Software Solutions Foundations of Program Designjava程序设计软件解决方案的基础.pptVIP

  • 6
  • 0
  • 约1.67万字
  • 约 58页
  • 2017-03-07 发布于上海
  • 举报

Java Software Solutions Foundations of Program Designjava程序设计软件解决方案的基础.ppt

Java Software Solutions Foundations of Program Designjava程序设计软件解决方案的基础

* * * * * * Extending Interfaces One interface can inherit from another interface, supporting multiple inheritance. interface Door { ? public void open(); ?public void close(); } interface LockableDoor extends Door { ?? public void lock(); ?? public void unlock(); } * Extending Interfaces class CarDoor implements LockableDoor { ?? private boolean isLocked = false; // methods inherited?? from Interface DOOR public void open() { ????? if ( !isLocked) ???????? System.out.println( Enter the car ); ?? } ??? public void close() { ????? S

文档评论(0)

1亿VIP精品文档

相关文档