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

  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 {
};
主站蜘蛛池模板: 井研县| 前郭尔| 宝应县| 酒泉市| 共和县| 元朗区| 大方县| 巴楚县| 雅安市| 濮阳县| 昆山市| 龙陵县| 长沙县| 富锦市| 宝应县| 什邡市| 奉化市| 榆中县| 汝阳县| 元氏县| 莱阳市| 商都县| 和平县| 昌都县| 胶南市| 且末县| 邯郸县| 广东省| 聂荣县| 汉川市| 阿图什市| 肇源县| 宾阳县| 东乡族自治县| 获嘉县| 江阴市| 吉安市| 安阳县| 如皋市| 衢州市| 乌兰察布市|