26 lines
409 B
Vala
26 lines
409 B
Vala
public class Animal : Object {
|
|
|
|
public void eat() {
|
|
stdout.printf("*chomp chomp*\n");
|
|
}
|
|
|
|
public void say_hello() {
|
|
stdout.printf ("parent hello\n");
|
|
}
|
|
}
|
|
|
|
public class Tiger : Animal {
|
|
|
|
public void say_hello_2() {
|
|
stdout.printf("*roar*\n");
|
|
}
|
|
}
|
|
|
|
/*public class Duck : Animal {
|
|
|
|
public override void say_hello() {
|
|
stdout.printf("*quack*\n");
|
|
}
|
|
}*/
|
|
|