-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
85 lines (79 loc) · 2.61 KB
/
Copy pathmain.cpp
File metadata and controls
85 lines (79 loc) · 2.61 KB
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
84
85
#include "Randomizer.h"
#include "RamdomizerService.h"
#include "Randomizers/LinearCongruential.cpp"
#include "Randomizers/QuadraticCongruential.cpp"
#include "Randomizers/FibonacciNumbers.cpp"
#include "Randomizers/InverseCongruence.cpp"
#include "Randomizers/Joining.cpp"
#include "Randomizers/ThreeSigma.cpp"
#include "Randomizers/PolarCoordinate.cpp"
#include "Randomizers/Ratio.cpp"
#include "Randomizers/Logarithm.cpp"
#include "Randomizers/ArensGammaDelimitation.cpp"
int getMethodNumber(){
std::cout << "Please, chose the method of random:\n"
"1)\t" + LinearCongruential::NAME + " method\n" +
"2)\t" + QuadraticCongruential::NAME + " method\n" +
"3)\t" + FibonacciNumbers::NAME + " method\n" +
"4)\t" + InverseCongruential::NAME + " method\n" +
"5)\t" + Joining::NAME + " method\n\n" +
"6)\t" + ThreeSigma::NAME + " method\n"
"7)\t" + PolarCoordinate::NAME + " method\n" +
"8)\t" + Ratio::NAME + " method\n\n" +
"9)\t" + Logarithm::NAME + " method\n"+
"10)\t" + ArensGammaDelimitation::NAME + " method\n\n"+
"Number of method:";
int method;
std::cin >> method;
return method;
}
int main(){
RandomizerService randomizerService = RandomizerService();
switch (getMethodNumber()){
case 1: {
randomizerService.setRandomize(new LinearCongruential());
break;
}
case 2: {
randomizerService.setRandomize(new QuadraticCongruential());
break;
}
case 3: {
randomizerService.setRandomize(new FibonacciNumbers());
break;
}
case 4: {
randomizerService.setRandomize(new InverseCongruential());
break;
}
case 5: {
randomizerService.setRandomize(new Joining());
break;
}
case 6:{
randomizerService.setRandomize(new ThreeSigma());
break;
}
case 7: {
randomizerService.setRandomize(new PolarCoordinate());
break;
}
case 8:{
randomizerService.setRandomize(new Ratio());
break;
}
case 9: {
randomizerService.setRandomize(new Logarithm());
break;
}
case 10:{
randomizerService.setRandomize(new ArensGammaDelimitation());
break;
}
default: {
std::cout << "Wrong input!";
return -1;
}
}
randomizerService.countStatistic();
}