File: animals.h

package info (click to toggle)
gprbuild 2023.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 5,672 kB
  • sloc: ada: 71,026; sh: 423; makefile: 422; python: 221; ansic: 108; 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
};