0
|
1 // $Header: /home/th/Dokumente/Entwicklung/MEIN_CVS/MiniD/src/run/interface_02.d,v 1.1 2004/08/22 07:47:07 th Exp $
|
|
2
|
|
3 // @author@ van eeshan <vanee@hotmail.com>
|
|
4 // @date@ 2004-08-05
|
|
5 // @uri@ news://ces67k$rgj$1@digitaldaemon.com
|
|
6
|
|
7 int status;
|
|
8
|
|
9 interface Interface1{
|
|
10 void one();
|
|
11 }
|
|
12
|
|
13 interface Interface2{
|
|
14 void two();
|
|
15 }
|
|
16
|
|
17 interface Interface3 : Interface1, Interface2{
|
|
18 void three();
|
|
19 }
|
|
20
|
|
21 class MyClass : Interface3{
|
|
22 void one(){
|
|
23 status=1;
|
|
24 }
|
|
25 void two(){
|
|
26 status=20;
|
|
27 }
|
|
28 void three(){
|
|
29 status=300;
|
|
30 }
|
|
31 }
|
|
32
|
|
33 int main(){
|
|
34 Interface3 i = new MyClass();
|
|
35 assert(status==0);
|
|
36 i.one();
|
|
37 assert(status==1);
|
|
38 i.two();
|
|
39 assert(status==20);
|
|
40 i.three();
|
|
41 assert(status==300);
|
|
42 return 0;
|
|
43 }
|