Yurttas/PL/OOL/Cplusplus/F/04/01/01/02/Q.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   Q.cpp
14*/
15
16
17#include "Q.h"
18
19Q::
20Q(const int i) : P(i),
21                 i3(i) {
22}
23
24int
25Q::get_i3() const {
26  return i3;
27}
28
29void
30Q::set_i3(const int i) {
31  i3=i;
32}
33
34ostream&
35operator<<(ostream& os,
36           const Q& q) {
37  os << q.i0;
38  os << endl;
39  os << q.i1;
40  os << endl;
41  os << q.i3;
42  os << endl;
43
44  return os;
45}