Inheritance/Single: Difference between revisions
Content deleted Content added
No edit summary |
No edit summary |
||
Line 132:
user> (isa? ::collie ::animal)
true</lang>
=={{header|Kite}}==
<lang Kite>
# Created by John Riselvato
class a [
property numb1,
property numb2,
construct [
this.numb1 = 0;
this.numb2 = 0;
],
method message() [
(this.numb1 - this.numb2)|print;
]
];
class b from a [
construct [
a|__construct__;
this.numb1 = 20;
]
];
class c from a [
construct [
a|__construct__;
this.numb2 = 10;
]
];
vara = make a();
varb = make b();
varc = make c();
vara|message;
varb|message;
varc|message;
</lang>
== {{header|Common Lisp}} ==
|