Yurttas/PL/OOL/Cplusplus/F/05/01/01/02/t a 21.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   : September 1, 1998.
11   author : Salih Yurttas.
12
13   t_a_21.cpp
14*/
15
16
17#include <iostream>
18
19using namespace std;
20
21#include "T_A.cpp"
22#include "t_aa.cpp"
23
24int main(int argc, char *argv[]) {
25
26  T_A<double> a;
27
28  t_aa("a value after default construction-T_A<double>() /",
29       a);
30
31  a.set_a0(8);
32  a.set_a1(5);
33
34  t_aa("a value after a.set_a0(8) /\n  value after a.set_a1(5) /",
35       a);
36
37  T_A<double> b(2);
38
39  t_aa("b value after default construction-T_A<double>(2) /",
40       a);
41
42  T_A<double> c(b);
43
44  t_aa("c value after T_A<double> c(b) /",
45       c);
46
47  b = a;
48
49  t_aa("b value after b=a /",
50       b);
51
52  cout << "b.get_a0() /" << endl;
53  cout << b.get_a0() << endl;
54  cout << "b.get_a1() /" << endl;
55  cout << b.get_a1() << endl;
56
57}