-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNode.h
51 lines (41 loc) · 1.08 KB
/
Node.h
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
#ifndef NODE_H
#define NODE_H
#include <iostream>
#include <iomanip>
#include <algorithm>
#include "Question.cpp"
#include "Dependency.cpp"
using namespace std;
class Node
{
public:
Node(string nam = "", Node *par = nullptr, Question *quest = nullptr);
virtual ~Node();
void setChild(Node *chi);
void setSibling(Node *sib);
void setDependency(Dependency depnd);
Node *getParent();
Node *getSibling();
Node *getChild();
bool getCompleted();
void checkCompleted();
void calculateCertainty();
void changeCertainty(double cer);
vector<Node *> checkDependency();
Node *readNext();
Node *findLearnRequest(string input);
void printName();
void printQuestion();
double getAnswer();
protected:
private:
string name;
bool completed;
double certainty;
Node *parent;
Node *sibling;
Node *child;
Question *question;
vector<Dependency> dependens; //one dependent contains pointer to node and a double
};
#endif // NODE_H