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 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
|
#include <cstdlib>
#include <iostream>
#include <cmath>
#include <iomanip>
#include <string>
#include "statsType.h"
using namespace std;
int main()
{
// **********************************************************
// Initalizations and headers
string bars, stars;
bars.append(50,'-');
stars.append(70,'=');
cout << endl << "Assignment #7 - Statistics Testing" << endl << endl;
// **********************************************************
//
// **********************************************************
// Some tests for the statsType class for integer type.
statsType <int> set1;
int min1, max1, med1, sum1, ave1;
int sStd1, pStd1, sk1, fp1;
cout << stars << endl;
cout << "Data Set 1 - Integers" << endl << endl;
set1.setFileName("dataFile1.txt");
set1.readDataFile();
cout << "Data Set 1 -> Unsorted:" << endl;
set1.printDataSet();
// **********************************************************
// Some tests for the statsType class for double type.
statsType <float> set2;
float min2, max2, med2, sum2, ave2;
float sStd2, pStd2, sk2, fp2;
cout << stars << endl;
cout << "Data Set 2 - float" << endl << endl;
set2.setFileName("dataFile2.txt");
set2.readDataFile();
set2.printDataSet();
// **********************************************************
// Some tests for the statsType class for long double type.
statsType <double> set3;
double min3, max3, med3, sum3, ave3;
double sStd3, pStd3, sk3, fp3;
cout << stars << endl;
cout << "Data Set 3 - double" << endl << endl;
set3.setFileName("dataFile3.txt");
set3.readDataFile();
set3.printDataSet();
// **********************************************************
// Some tests for the statsType class for long double type.
statsType <long long> set4;
long long min4, max4, med4, sum4, ave4;
long long sStd4, pStd4, sk4, fp4;
cout << stars << endl;
cout << "Data Set 4 - long long" << endl << endl;
set4.setFileName("dataFile4.txt");
set4.readDataFile();
set4.printDataSet();
// Some tests for the statsType class for long double type.
statsType <long double> set5;
long double min5, max5, med5, sum5, ave5;
long double sStd5, pStd5, sk5, fp5;
cout << stars << endl;
cout << "Data Set 5 - long double" << endl << endl;
set5.setFileName("dataFile5.txt");
set5.readDataFile();
set5.printDataSet();
return 0;
}
|