Init
This commit is contained in:
44
P1/ADS_P1_2_Binaerbaum/TreeNode.h
Executable file
44
P1/ADS_P1_2_Binaerbaum/TreeNode.h
Executable file
@@ -0,0 +1,44 @@
|
||||
/*************************************************
|
||||
* ADS Praktikum 1.2
|
||||
* TreeNode.h
|
||||
* Erweiterung um Hilfsattribute und -funktionen gestattet, wenn erforderlich.
|
||||
*************************************************/
|
||||
#pragma once
|
||||
#include <string>
|
||||
|
||||
using namespace std;
|
||||
|
||||
class TreeNode {
|
||||
private:
|
||||
int m_NodeOrderID;
|
||||
int m_NodeChronologicalID;
|
||||
string m_Name;
|
||||
int m_Age;
|
||||
double m_Income;
|
||||
int m_PostCode;
|
||||
|
||||
TreeNode* m_left = nullptr;
|
||||
TreeNode* m_right = nullptr;
|
||||
|
||||
|
||||
public:
|
||||
TreeNode(int, int, string, int, double, int);
|
||||
int getNodeOrderID() const;
|
||||
int getNodeChronologicalID() const;
|
||||
string getName() const;
|
||||
int getAge() const;
|
||||
double getIncome() const;
|
||||
int getPostCode() const;
|
||||
TreeNode* getLeft();
|
||||
TreeNode* getRight();
|
||||
|
||||
void setNodeOrderID(int noID);
|
||||
void setName(string name);
|
||||
void setAge(int age);
|
||||
void setIncome(double income);
|
||||
void setPostCode(int postcode);
|
||||
void setLeft(TreeNode* node);
|
||||
void setRight(TreeNode* node);
|
||||
|
||||
void print();
|
||||
};
|
||||
Reference in New Issue
Block a user