Yurttas/PL/OOL/Cplusplus/F/04/01/01/02/R.cpp

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