File: animals_c.cc

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 (36 lines) | stat: -rw-r--r-- 674 bytes parent folder | download | duplicates (8)
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
30
31
32
33
34
35
36
//animals.cpp

#include "animals.h"
#include <iostream>

using namespace std;

//  -------------------------------------------------------------
void Animal::Set_Age (int New_Age)
{
  cout << " In C++ Animal::Set_Age" << endl;
  Age_Count = New_Age;
}

int Animal:: Age (void)
{
  cout << " In C++ Animal::Age" << endl;
  return Age_Count;
}

//  -------------------------------------------------------------
int Dog::Number_Of_Teeth (void)
{
   cout << " In C++ Dog::Number_Of_Teeth" << endl;
   return Tooth_Count;
}

void Dog::Set_Owner (char* Name)
{
   cout << " In C++ Dog::Set_Owner" << endl;
}

Dog::Dog(void)
{
  cout << "C++: Constructor of Dog called" << endl;
}