#ifndef NODE_H
#define NODE_H

#include "prog2.h"

class Tree;

class Node
{
   friend class Tree;
 public:
   Node();
   Node(char a, char b, char c, char d, char e, char f, char g, char h, char i);
   Node* at_right();
   Node* at_left();
   void set_code(size_t sz, char in[]);
   size_t get_data();
 private:
   Node* right;
   Node* left;
   size_t weight;  //number of times a specific 9 digits occure
   size_t data[10];  //the value of the nine digits from file
   char* code;  //the code for the nine digits
   size_t code_size;  //size of the code
};

#endif  //NODE_H