Yurttas/PL/OOL/Cplusplus/F/05/01/01/02/I A.cpp

From ZCubes Wiki
Revision as of 23:37, 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)
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   : September 1, 1998.
11   author : Salih Yurttas.
12
13   I_A.cpp
14*/
15
16
17#include "I_A.h"
18
19I_A::
20I_A(const int v) : a0(v),
21                   a1(v) {
22}
23
24I_A::
25I_A(const I_A& a) : a0(a.a0),
26                    a1(a.a1) {
27}
28
29I_A&
30I_A::
31operator=(const I_A& a) {
32  a0 = a.a0;
33  a1 = a.a1;
34  return *this;
35}
36
37int
38I_A::
39get_a0() const {
40  return a0;
41}
42
43int
44I_A::
45get_a1() const {
46  return a1;
47}
48
49void
50I_A::
51set_a0(const int v) {
52  a0 = v;
53}
54
55void
56I_A::
57set_a1(const int v) {
58  a1 = v;
59}
60
61ostream& operator<<(ostream& os,
62                    const I_A& a) {
63  os << a.a0 << endl;
64  os << a.a1 << endl;
65  os << endl;
66
67  return os;
68}