#include #include using namespace std; #include "vertex.h" //====================================================== constructor Vertex::Vertex() { id = -1; name = '\0'; }//end constructor Vertex::Vertex(int nuId) { id = nuId; name = '\0'; } Vertex::Vertex(int nuId, string nuName) { id = nuId; name = nuName; } //======================================================= destructor // free space allocated for the string Vertex::~Vertex() { name.~basic_string(); } int Vertex::getId() { return this->id; } string Vertex::getName() { return this->name; } string Vertex::getOutput() { return this->output; } void Vertex::setId(int newId) { this->id = newId; } void Vertex::setName(string &newName) { this->name = newName; } void Vertex::setOutput(string &newOutput) { this->output = newOutput; } void Vertex::printInfo() { cout << "Vertex::< " << id << ", " << name << " >\n"; }