setup project for assignment 3

This commit is contained in:
2021-01-08 16:01:54 +01:00
parent 51b54f68fb
commit 2f9f32e50e
13 changed files with 268 additions and 0 deletions

26
Assignment_3/lib/Set.cpp Normal file
View File

@@ -0,0 +1,26 @@
#include "Set.h"
#include "Node.h"
#include <iostream>
#include<sstream>
Set::Set(std::string _name){
name = _name;
first = Node::Dummy();
first->next = Node::Dummy();
}
bool Set::add(int element) { return false; }
bool Set::rmv(int element) { return false; }
bool Set::ctn(int element) { return false; }
std::string Set::get_name() { return name; }
std::string Set::print_set(){
Node* c = this->first->next;
std::stringstream ss;
while (!c->is_dummy()) {
ss << c->get_data() << " ";
c = c->next;
}
return ss.str();
}