generealized to superclass set

This commit is contained in:
2020-12-31 16:30:34 +01:00
parent 55b7225952
commit c4e62b1360
4 changed files with 34 additions and 18 deletions

19
Assignment_2/Set.cpp Normal file
View File

@@ -0,0 +1,19 @@
#pragma once
#include "Node.cpp"
class Set {
protected:
Set();
Node* first;
public:
virtual bool add(int element);
virtual bool rmv(int element);
virtual bool ctn(int element);
};
Set::Set(){
first = Node::Dummy(); // dummy node;
Node* last = Node::Dummy();
first->next = last;
}