RosettaCodeData/Task/Inheritance-Single/Ada/inheritance-single.ada

14 lines
450 B
Ada
Raw Permalink Normal View History

2013-04-10 21:29:02 -07:00
package Inheritance is
type Animal is tagged private;
type Dog is new Animal with private;
type Cat is new Animal with private;
type Lab is new Dog with private;
type Collie is new Dog with private;
private
type Animal is tagged null record;
type Dog is new Animal with null record;
type Cat is new Animal with null record;
type Lab is new Dog with null record;
type Collie is new Dog with null record;
end Inheritance;