mirror of
https://github.com/13hannes11/UU_la_parallel_programming_practical_assignments.git
synced 2024-09-04 00:50:58 +02:00
update filenames
This commit is contained in:
5
Assignment_3/lib/ADT_Stack.cpp
Normal file
5
Assignment_3/lib/ADT_Stack.cpp
Normal 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);
|
||||
};
|
||||
@@ -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 )
|
||||
|
||||
@@ -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();
|
||||
};
|
||||
@@ -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
15
Assignment_3/lib/Stack.h
Normal 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();
|
||||
};
|
||||
Reference in New Issue
Block a user