Organism.hpp 1.04 KB
Newer Older
Imanol Pérez committed
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
#ifndef ORGANISMDEF
#define ORGANISMDEF

//////////////////////////////////////////////////////
//                                                  //
//           Class for a single organism            //
//                                                  //
//                  Imanol Perez                    //
//                  January 2017                    //
//                                                  //
//////////////////////////////////////////////////////

#include <cmath>
#include "Exception.hpp"//  This class throws errors using the class "error"
#include <algorithm>

class Organism;

class Organism
{
public:
   int MA1;   // first moving average
   int MA2; // second moving average
   double returns; // returns created by this organism
   Organism(); // constructor
   Organism(int, int); // constructor
   ~Organism();
   void DisposeObject();


   bool isNull(void); // checks if organism is null
   //output
   friend std::ostream& operator<<(std::ostream&, Organism&);


};


#endif