Yurttas/PL/OOL/Cplusplus/F/04/02/02/00/P.cpp

From ZCubes Wiki
Jump to navigation Jump to search
 1/*
 2   Copyright(C) 1998
 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   : January 1, 1998.
11   author : Salih Yurttas.
12
13   P.cpp
14*/
15
16
17#include "P.h"
18
19P::
20P(const int i) : i1(i) {
21  cout << "- P" << endl;
22}
23
24P::
25~P() {
26  cout << "P -" << endl;
27}
28
29int
30P::
31get_i1() const {
32  return i1;
33}
34
35void
36P::
37set_i1(const int i) {
38  i1=i;
39}
40
41ostream&
42operator<<(ostream& os,
43           const P& p) {
44  os << p.i1 << endl;
45  os << endl;
46
47  return os;
48}