Yurttas/PL/OOL/Cplusplus/F/04/02/03/00/animals out.cpp
Jump to navigation
Jump to search
1/*
2 Copyright(C) 2001
3 All Rights Reserved. Salih Yurttas, ZCubes, BitsOfCode Software Systems, Inc..
4
5 Permission to use, copy, modify, and distribute this
6 software and its documentation for EDUCATIONAL purposes
7 and without fee is hereby granted provided that this
8 copyright notice appears in all copies.
9
10 date : June 1, 2001.
11 author : Salih Yurttas.
12
13 animals_out.cpp
14*/
15
16
17#include <iostream>
18
19using namespace std;
20
21#include "Animal.h"
22
23void animals_out(Animal* a,
24 const char* b,
25 const char* c,
26 const int d) {
27 cout << "Default construction of a " << b << ": " << endl;
28 a->print();
29
30 a->set_name(c);
31 a->set_age(d);
32
33 cout << "After set members of " << b << ": " << endl;
34 a->print();
35
36 cout << endl;
37}