Yurttas/PL/OOL/Cplusplus/F/03/01/00/F.cpp

Revision as of 21:51, 6 November 2013 by MassBot1 (talk | contribs) (Created page with "<syntaxhighlight lang="cpp" line start="1" enclose="div">/* Copyright(C) 1998 All Rights Reserved. Salih Yurttas, ZCubes, BitsOfCode Software Systems, Inc.. Perm...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
 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   F.cpp
14*/
15
16
17#include "F.h"
18
19F::
20F(const int i) : i1(i),
21                 i2(i) {
22}
23
24F::
25F(const F& f) : i1(f.i1),
26                i2(f.i2) {
27}
28
29int
30F::
31get_i1() const {
32  return i1;
33}
34
35int
36F::
37get_i2() const {
38  return i2;
39}
40
41void
42F::
43set_i1_i2(const int i) {
44  i1+=i;
45  i2-=i;
46}
47
48ostream& operator<<(ostream& os,
49                    const F& f) {
50  os << endl;
51  os << f.i1 << endl;
52  os << f.i2 << endl;
53  os << endl;
54
55  return os;
56}