官术网_书友最值得收藏!

  Inheritance

Interfaces can extend one or more interfaces if they want to carry out other interface operations, and in addition to that, declare their own operations as follows:

module EmployeeHierarchy {
interface Person {
typedef unsigned short ushort;
ushort method1();
};
interface Employee : Person {
Boolean method2(ushort num);
};
};

In the preceding code, the Employee interface extends the Person interface and adds method2() in addition to method1() inherited from the Person interface.

The following is an example of one interface inheriting multiple interfaces:

interface Clerk: Person, Employee, Associate::Administrator {
};
主站蜘蛛池模板: 商城县| 浪卡子县| 曲沃县| 克拉玛依市| 清徐县| 区。| 西平县| 河池市| 高台县| 绥棱县| 民县| 靖西县| 澎湖县| 兴城市| 宜阳县| 砚山县| 同德县| 乐亭县| 闸北区| 大丰市| 通化县| 灌南县| 泸定县| 中西区| 怀安县| 张掖市| 加查县| 纳雍县| 怀集县| 枣阳市| 京山县| 金湖县| 石楼县| 八宿县| 蕲春县| 盘山县| 吉木萨尔县| 漳平市| 木里| 麟游县| 南阳市|