update filenames

This commit is contained in:
2021-01-08 17:17:32 +01:00
parent 2f9f32e50e
commit 6485a3b3d6
6 changed files with 33 additions and 34 deletions

View File

@@ -0,0 +1,5 @@
class Stack {
void push(int element, bool output);
void pop(int element, bool output);
void size(int element, bool output);
};

View File

@@ -1 +1 @@
add_library(sets STATIC Node.h Node.cpp Set.h Set.cpp )
add_library(sets STATIC Node.h Node.cpp Stack.h Stack.cpp ADT_Stack.cpp )

View File

@@ -1,16 +0,0 @@
#pragma once
#include "Node.h"
class Set {
protected:
std::string name;
Set(std::string _name);
Node* first;
public:
bool add(int element);
bool rmv(int element);
bool ctn(int element);
std::string get_name();
std::string print_set();
};

View File

@@ -1,21 +1,19 @@
#include "Set.h"
#include "Stack.h"
#include "Node.h"
#include <iostream>
#include<sstream>
Set::Set(std::string _name){
name = _name;
Stack::Stack(std::string _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; }
bool Stack::push(int element) { return false; }
bool Stack::pop(int element) { return false; }
bool Stack::size(int element) { return false; }
std::string Set::print_set(){
std::string Stack::print_stack(){
Node* c = this->first->next;
std::stringstream ss;
while (!c->is_dummy()) {

15
Assignment_3/lib/Stack.h Normal file
View File

@@ -0,0 +1,15 @@
#pragma once
#include "Node.h"
class Stack {
protected:
std::string name;
Stack(std::string _name);
Node* first;
public:
bool push(int element);
bool pop(int element);
bool size(int element);
std::string print_stack();
};