Abstract type: Difference between revisions

m (Update reason for omission for MiniZinc)
Line 2,915:
{{omit from|TorqueScript}}
 
=={{header|Vala}}==
<lang vala>public abstract class Animal : Object {
public void eat() {
stdout.printf("Chomp! Chomp!\n");
}
public abstract void talk();
}
 
public class Mouse : Animal {
public override void talk() {
stdout.printf("Squeak! Squeak!\n");
}
}
 
public class Dog : Animal {
public override void talk() {
stdout.printf("Woof! Woof!\n");
}
}
 
void main() {
Dog mike = new Dog();
Mouse scott = new Mouse();
 
mike.talk();
mike.eat();
scott.talk();
scott.eat();
}</lang>
 
{{out}}
<pre>
Woof! Woof!
Chomp! Chomp!
Squeak! Squeak!
Chomp! Chomp!
</pre>
=={{header|VBA}}==
In VBA a class can implement properties declared by an other class, the interface class.
The implementing class states "Implements <name of interface class". The names of the implemented properties are prepended by the name of the interface class and an underscore "_". Names of (interface) classes and properties can therefore not contain an underscore.
 
=={{header|Visual Basic}}==
=== Abstract Classes ===
Anonymous user