Skip to content
Snippets Groups Projects
Commit 7b80fde8 authored by Eduardo Machado's avatar Eduardo Machado
Browse files

criado objeto node

parents
No related branches found
No related tags found
No related merge requests found
// Implementado por Eduardo Machado
// 2015
class Node{
private:
int key;
char truck;
Node *leftNode;
Node *rightNode;
Node *fatherNode;
public:
void setKey(int newKey);
void setTruck(char newTruck);
void setLeftNode(Node *newLeftNode);
void setRightNode(Node *newRightNode);
void setFatherNode(Node *newRatherNode);
int getKey();
char getTruck();
Node* getLeftNode();
Node* getRightNode();
Node* getFatherNode();
}
main.cpp 0 → 100644
// Implementado por Eduardo Machado
// 2015
#include <iostream>
using namespace std;
int main(int argc, char *argv[]) {
return 0;
}
// Implementado por Eduardo Machado
// 2015
#include <iostream>
#include "bst_lib.h"
using namespace std;
// Funções do objeto Node.
void Node::setKey(int newKey){
key=newKey;
}
void Node::setTruck(char newTruck){
truck=newTruck;
}
void Node::setLeftNode(Node *newLeftNode){
leftNode=newLeftNode;
}
void Node::setRightNode(Node *newRightNode){
rightNode=newRightNode;
}
void Node::setFatherNode(Node *newFatherNode){
fatherNode=newFatherNode;
}
int Node::getKey(){
return(this->key);
}
char Node::getTruck(){
return(this->truck);
}
Node* Node::getLeftNode(){
return(this->leftNode);
}
Node* Node::getRightNode(){
return(this->rightNode);
}
Node* Node::getFatherNode(){
return(this->fatherNode);
}
// Funções de manipulação da árvore
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment