File: animals.h

package info (click to toggle)
gprbuild 2021.0.0.0778b109-5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 5,776 kB
  • sloc: ada: 70,235; makefile: 452; sh: 396; python: 222; ansic: 151; cpp: 89; fortran: 62; xml: 13
file content (29 lines) | stat: -rw-r--r-- 448 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
//animals.h

class Carnivore {
public:
   virtual int Number_Of_Teeth () = 0;
};

class Domestic {
public:
   virtual void Set_Owner (char* Name) = 0;
};

class Animal {
public:
  int Age_Count;
  virtual void Set_Age (int New_Age);
  virtual int Age ();
};

class Dog : Animal, Carnivore, Domestic {
 public:
  int  Tooth_Count;
  char *Owner;

  virtual int  Number_Of_Teeth ();
  virtual void Set_Owner (char* Name);

  Dog(); // Constructor
};