Yurttas/PL/OOL/Cplusplus/F/04/01/01/02/P.cpp
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) : i0(i),
21 i1(i),
22 i2(i) {
23}
24
25int
26P::
27get_i1() const {
28 return i1;
29}
30
31int
32P::
33get_i2() const {
34 return i2;
35}
36
37void
38P::
39set_i1(const int i) {
40 i1=i;
41}
42
43void
44P::
45set_i2(const int i) {
46 i2=i;
47}
48
49ostream&
50operator<<(ostream& os,
51 const P& p) {
52 os << p.i0;
53 os << endl;
54 os << p.i1;
55 os << endl;
56 os << p.i2;
57 os << endl;
58
59 return os;
60}