diff --git a/CM2005 Object Oriented Programming/Midterm/Midterm Project/TradingBot.cpp b/CM2005 Object Oriented Programming/Midterm/Midterm Project/TradingBot.cpp index 5ca74e1..6639c43 100644 --- a/CM2005 Object Oriented Programming/Midterm/Midterm Project/TradingBot.cpp +++ b/CM2005 Object Oriented Programming/Midterm/Midterm Project/TradingBot.cpp @@ -1,20 +1,26 @@ #include "TradingBot.h" #include +#include +#include "main.cpp" -Bot::Bot(std::string filename) +Bot::Bot(MerkelMain _app) { - orders = CSVReader::readCSV(filename); - Print(20); + app = _app; } -void Bot::Print(int intLimit) +std::vector Bot::linearRegresion(std::vector orderList, unsigned int start, unsigned int end) { - int i = 0; - for (OrderBookEntry &entry : orders) - { - std::cout << entry.product << " " << entry.price << " " << entry.amount << std::endl; - i++; - if (i == intLimit) - break; - } + //get all dates from the order book +} + +std::vector Bot::getTimeStamps() +{ + std::vector timeStamps; + //timeStamps.push_back(app.; + //while(std::find(timeStamps.begin(), timeStamps.end(), )) +} + +double Bot::getMean(std::vector) +{ + } \ No newline at end of file diff --git a/CM2005 Object Oriented Programming/Midterm/Midterm Project/TradingBot.h b/CM2005 Object Oriented Programming/Midterm/Midterm Project/TradingBot.h index 4131b23..efdc0a3 100644 --- a/CM2005 Object Oriented Programming/Midterm/Midterm Project/TradingBot.h +++ b/CM2005 Object Oriented Programming/Midterm/Midterm Project/TradingBot.h @@ -7,11 +7,13 @@ class Bot { public: - Bot(std::string filename); + MerkelMain app; + Bot(MerkelMain app); /** returns a vector with the Y, B0 and B1 values in the formula Y = B0 + B1.X */ std::vector linearRegresion(std::vector orderList, unsigned int start, unsigned int end); - void Print(int intLimit); + private: - std::vector orders; + double getMean(std::vector); + std::vector Bot::getTimeStamps(); }; \ No newline at end of file diff --git a/CM2005 Object Oriented Programming/Midterm/Midterm Project/main.cpp b/CM2005 Object Oriented Programming/Midterm/Midterm Project/main.cpp index d0e0ec9..5aa43bc 100644 --- a/CM2005 Object Oriented Programming/Midterm/Midterm Project/main.cpp +++ b/CM2005 Object Oriented Programming/Midterm/Midterm Project/main.cpp @@ -6,6 +6,6 @@ int main() { MerkelMain app{}; - Bot myBot("20200317.csv"); + Bot myBot(app); //app.init(); } diff --git a/CM2010 Software Design and Development/Topic 3/7.2.6/a.exe b/CM2010 Software Design and Development/Topic 3/7.2.6/a.exe new file mode 100644 index 0000000..6c88d96 Binary files /dev/null and b/CM2010 Software Design and Development/Topic 3/7.2.6/a.exe differ diff --git a/CM2010 Software Design and Development/Topic 3/7.2.6/cppunit.lib b/CM2010 Software Design and Development/Topic 3/7.2.6/cppunit.lib new file mode 100644 index 0000000..5fb6df7 Binary files /dev/null and b/CM2010 Software Design and Development/Topic 3/7.2.6/cppunit.lib differ diff --git a/CM2010 Software Design and Development/Topic 3/7.2.6/main.cpp b/CM2010 Software Design and Development/Topic 3/7.2.6/main.cpp new file mode 100644 index 0000000..3bce0ff --- /dev/null +++ b/CM2010 Software Design and Development/Topic 3/7.2.6/main.cpp @@ -0,0 +1,8 @@ +#include +#include + + +int main() +{ + std::cout << "Hello!" << std::endl; +} \ No newline at end of file