-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
83 lines (62 loc) · 1.56 KB
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#include "Polynomial.h"
int main()
{
// Creating first polynomial ratios and powers for testing
int size = 3;
int *arr = new int[size];
int *brr = new int[size];
for (int i = 0; i < size; i++)
{
arr[i] = i + 2;
brr[i] = i + 3;
}
// Creating second polynomial ratios and powers for testing
int size2 = 3;
int *arr2 = new int[size2];
int *brr2 = new int[size2];
for (int i = 0; i < size2; i++)
{
arr2[i] = i + 4;
brr2[i] = i + 3;
}
// Creating by user input
/* Polynomial p0;
cin >> p0;
cout << p0; */
/* Polynomial p1(size, arr, brr);
cout << p1; */
/* Polynomial p2(size2, arr2, brr2);
cout << p2; */
/* Polynomial *p3 = p1 + p2;
cout << p3; */
/* p1 += p2;
cout << p1; */
/* Polynomial *p4 = p2 - p1;
cout << p4; */
/* p1 -= p2;
cout << p1; */
/* Polynomial *p5 = p2 * p1;
cout << *p5; */
/* p2 *= p1;
cout << p2; */
/* Polynomial *p6 = p1.deleteSentenceByPow(4);
cout << p6; */
/* Long calculatedVal = p1.calculate(1);
cout << endl
<< calculatedVal << endl; */
/* bool b1 = p1 == p2;
cout << endl
<< boolalpha << b1 << endl; */
/* bool b2 = p1 >= p2;
cout << endl
<< boolalpha << b2 << endl; */
/* bool b3 = p1 <= p2;
cout << endl
<< boolalpha << b3 << endl; */
/* Polynomial *p7 = p2 * p1;
cout << p7;
p7->sortByPowDecrement();
cout << p7; */
// Editing Polynomial is done by using setters
return 0;
}