test
This commit is contained in:
parent
37776af5db
commit
ab03d5f10c
4045 changed files with 286212 additions and 3 deletions
41
.config/Code/User/History/1605affa/7zmm.cpp
Normal file
41
.config/Code/User/History/1605affa/7zmm.cpp
Normal file
|
@ -0,0 +1,41 @@
|
|||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
class Set{
|
||||
// You will need an array to store the elements of the set.
|
||||
// You will also need a variable to keep track of the size of the array.
|
||||
int* elements;
|
||||
int size;
|
||||
public:
|
||||
Set() : elements(nullptr), size(0){}
|
||||
Set(const int* elements, int size) : elements(elements), size(size){}
|
||||
Set(const Set& copy) : size(copy.size){
|
||||
elements = new int[size];
|
||||
for(int i=0;i<size;i++) elements[i] = copy.elements[i];
|
||||
}
|
||||
// Binary Operators
|
||||
// Set Operators
|
||||
Set operator+(const Set& val) const; // Union
|
||||
Set operator*(const Set& val) const; // Intersection
|
||||
Set operator-(const Set& val) const; // Difference
|
||||
// Compound Assignment Operators
|
||||
Set& operator+=(const Set& rhs); // Union Assignment
|
||||
Set& operator*=(const Set& rhs); // Intersection Assignment
|
||||
Set& operator-=(const Set& rhs); // Difference Assignment
|
||||
// Logical Operators
|
||||
bool operator==(const Set& val) const;
|
||||
bool operator!=(const Set& val) const;
|
||||
// Functional Operators
|
||||
Set& operator>(Set&); // Sort the elements in the set
|
||||
int& operator[](int element); // Access element at index
|
||||
bool operator()(int element) const; // Check if element is in the set
|
||||
bool operator()(int element, int dumy); // Add element to the set if it is not already in set, The dumy element to differenciate from the other operator
|
||||
bool operator()(int element, int dumy,int dumy2);// Add element to the set if it is not already in set and element is lcm between any to numbers of the set,
|
||||
// Two dumy elements to differenciate from the other operator
|
||||
// Additional Functions for functional operators
|
||||
int find(int element) const; // Find element in the set
|
||||
void display();
|
||||
~Set(); // destructor
|
||||
friend std::ostream& operator<<(std::ostream& output, const Set& val); // outputs the Set
|
||||
friend std::istream& operator>>(std::istream& input, Set& val); // inputs the Set
|
||||
};
|
44
.config/Code/User/History/1605affa/9HSH.cpp
Normal file
44
.config/Code/User/History/1605affa/9HSH.cpp
Normal file
|
@ -0,0 +1,44 @@
|
|||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
class Set{
|
||||
// You will need an array to store the elements of the set.
|
||||
// You will also need a variable to keep track of the size of the array.
|
||||
int* elements;
|
||||
int size;
|
||||
public:
|
||||
Set() : elements(nullptr), size(0){}
|
||||
Set(const int* elements, int size) : size(size){
|
||||
elements = new int[size];
|
||||
for(int i=0;i<size;i++) this->elements[i] = elements[i];
|
||||
}
|
||||
Set(const Set& copy) : size(copy.size){
|
||||
elements = new int[size];
|
||||
for(int i=0;i<size;i++) elements[i] = copy.elements[i];
|
||||
}
|
||||
// Binary Operators
|
||||
// Set Operators
|
||||
Set operator+(const Set& val) const; // Union
|
||||
Set operator*(const Set& val) const; // Intersection
|
||||
Set operator-(const Set& val) const; // Difference
|
||||
// Compound Assignment Operators
|
||||
Set& operator+=(const Set& rhs); // Union Assignment
|
||||
Set& operator*=(const Set& rhs); // Intersection Assignment
|
||||
Set& operator-=(const Set& rhs); // Difference Assignment
|
||||
// Logical Operators
|
||||
bool operator==(const Set& val) const;
|
||||
bool operator!=(const Set& val) const;
|
||||
// Functional Operators
|
||||
Set& operator>(Set&); // Sort the elements in the set
|
||||
int& operator[](int element); // Access element at index
|
||||
bool operator()(int element) const; // Check if element is in the set
|
||||
bool operator()(int element, int dumy); // Add element to the set if it is not already in set, The dumy element to differenciate from the other operator
|
||||
bool operator()(int element, int dumy,int dumy2);// Add element to the set if it is not already in set and element is lcm between any to numbers of the set,
|
||||
// Two dumy elements to differenciate from the other operator
|
||||
// Additional Functions for functional operators
|
||||
int find(int element) const; // Find element in the set
|
||||
void display();
|
||||
~Set(); // destructor
|
||||
friend std::ostream& operator<<(std::ostream& output, const Set& val); // outputs the Set
|
||||
friend std::istream& operator>>(std::istream& input, Set& val); // inputs the Set
|
||||
};
|
40
.config/Code/User/History/1605affa/H7Rw.cpp
Normal file
40
.config/Code/User/History/1605affa/H7Rw.cpp
Normal file
|
@ -0,0 +1,40 @@
|
|||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
class Set{
|
||||
// You will need an array to store the elements of the set.
|
||||
// You will also need a variable to keep track of the size of the array.
|
||||
int* elements;
|
||||
int size;
|
||||
public:
|
||||
Set() : elements(nullptr), size(0){}
|
||||
Set(const int* elements, int size){
|
||||
|
||||
}
|
||||
Set(const Set& copy); // copy constructor
|
||||
// Binary Operators
|
||||
// Set Operators
|
||||
Set operator+(const Set& val) const; // Union
|
||||
Set operator*(const Set& val) const; // Intersection
|
||||
Set operator-(const Set& val) const; // Difference
|
||||
// Compound Assignment Operators
|
||||
Set& operator+=(const Set& rhs); // Union Assignment
|
||||
Set& operator*=(const Set& rhs); // Intersection Assignment
|
||||
Set& operator-=(const Set& rhs); // Difference Assignment
|
||||
// Logical Operators
|
||||
bool operator==(const Set& val) const;
|
||||
bool operator!=(const Set& val) const;
|
||||
// Functional Operators
|
||||
Set& operator>(Set&); // Sort the elements in the set
|
||||
int& operator[](int element); // Access element at index
|
||||
bool operator()(int element) const; // Check if element is in the set
|
||||
bool operator()(int element, int dumy); // Add element to the set if it is not already in set, The dumy element to differenciate from the other operator
|
||||
bool operator()(int element, int dumy,int dumy2);// Add element to the set if it is not already in set and element is lcm between any to numbers of the set,
|
||||
// Two dumy elements to differenciate from the other operator
|
||||
// Additional Functions for functional operators
|
||||
int find(int element) const; // Find element in the set
|
||||
void display();
|
||||
~Set(); // destructor
|
||||
friend std::ostream& operator<<(std::ostream& output, const Set& val); // outputs the Set
|
||||
friend std::istream& operator>>(std::istream& input, Set& val); // inputs the Set
|
||||
};
|
41
.config/Code/User/History/1605affa/Ks4u.cpp
Normal file
41
.config/Code/User/History/1605affa/Ks4u.cpp
Normal file
|
@ -0,0 +1,41 @@
|
|||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
class Set{
|
||||
// You will need an array to store the elements of the set.
|
||||
// You will also need a variable to keep track of the size of the array.
|
||||
int* elements;
|
||||
int size;
|
||||
public:
|
||||
Set() : elements(nullptr), size(0){}
|
||||
Set(const int* elements, int size) : elements(int*(elements)), size(size){}
|
||||
Set(const Set& copy) : size(copy.size){
|
||||
elements = new int[size];
|
||||
for(int i=0;i<size;i++) elements[i] = copy.elements[i];
|
||||
}
|
||||
// Binary Operators
|
||||
// Set Operators
|
||||
Set operator+(const Set& val) const; // Union
|
||||
Set operator*(const Set& val) const; // Intersection
|
||||
Set operator-(const Set& val) const; // Difference
|
||||
// Compound Assignment Operators
|
||||
Set& operator+=(const Set& rhs); // Union Assignment
|
||||
Set& operator*=(const Set& rhs); // Intersection Assignment
|
||||
Set& operator-=(const Set& rhs); // Difference Assignment
|
||||
// Logical Operators
|
||||
bool operator==(const Set& val) const;
|
||||
bool operator!=(const Set& val) const;
|
||||
// Functional Operators
|
||||
Set& operator>(Set&); // Sort the elements in the set
|
||||
int& operator[](int element); // Access element at index
|
||||
bool operator()(int element) const; // Check if element is in the set
|
||||
bool operator()(int element, int dumy); // Add element to the set if it is not already in set, The dumy element to differenciate from the other operator
|
||||
bool operator()(int element, int dumy,int dumy2);// Add element to the set if it is not already in set and element is lcm between any to numbers of the set,
|
||||
// Two dumy elements to differenciate from the other operator
|
||||
// Additional Functions for functional operators
|
||||
int find(int element) const; // Find element in the set
|
||||
void display();
|
||||
~Set(); // destructor
|
||||
friend std::ostream& operator<<(std::ostream& output, const Set& val); // outputs the Set
|
||||
friend std::istream& operator>>(std::istream& input, Set& val); // inputs the Set
|
||||
};
|
43
.config/Code/User/History/1605affa/Lx3v.cpp
Normal file
43
.config/Code/User/History/1605affa/Lx3v.cpp
Normal file
|
@ -0,0 +1,43 @@
|
|||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
class Set{
|
||||
// You will need an array to store the elements of the set.
|
||||
// You will also need a variable to keep track of the size of the array.
|
||||
int* elements;
|
||||
int size;
|
||||
public:
|
||||
Set() : elements(nullptr), size(0){}
|
||||
Set(const int* elements, int size) : size(size){
|
||||
this->elements = elements;
|
||||
}
|
||||
Set(const Set& copy) : size(copy.size){
|
||||
elements = new int[size];
|
||||
for(int i=0;i<size;i++) elements[i] = copy.elements[i];
|
||||
}
|
||||
// Binary Operators
|
||||
// Set Operators
|
||||
Set operator+(const Set& val) const; // Union
|
||||
Set operator*(const Set& val) const; // Intersection
|
||||
Set operator-(const Set& val) const; // Difference
|
||||
// Compound Assignment Operators
|
||||
Set& operator+=(const Set& rhs); // Union Assignment
|
||||
Set& operator*=(const Set& rhs); // Intersection Assignment
|
||||
Set& operator-=(const Set& rhs); // Difference Assignment
|
||||
// Logical Operators
|
||||
bool operator==(const Set& val) const;
|
||||
bool operator!=(const Set& val) const;
|
||||
// Functional Operators
|
||||
Set& operator>(Set&); // Sort the elements in the set
|
||||
int& operator[](int element); // Access element at index
|
||||
bool operator()(int element) const; // Check if element is in the set
|
||||
bool operator()(int element, int dumy); // Add element to the set if it is not already in set, The dumy element to differenciate from the other operator
|
||||
bool operator()(int element, int dumy,int dumy2);// Add element to the set if it is not already in set and element is lcm between any to numbers of the set,
|
||||
// Two dumy elements to differenciate from the other operator
|
||||
// Additional Functions for functional operators
|
||||
int find(int element) const; // Find element in the set
|
||||
void display();
|
||||
~Set(); // destructor
|
||||
friend std::ostream& operator<<(std::ostream& output, const Set& val); // outputs the Set
|
||||
friend std::istream& operator>>(std::istream& input, Set& val); // inputs the Set
|
||||
};
|
40
.config/Code/User/History/1605affa/Mwlx.cpp
Normal file
40
.config/Code/User/History/1605affa/Mwlx.cpp
Normal file
|
@ -0,0 +1,40 @@
|
|||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
class Set{
|
||||
// You will need an array to store the elements of the set.
|
||||
// You will also need a variable to keep track of the size of the array.
|
||||
int* elements;
|
||||
int size;
|
||||
public:
|
||||
Set() : elements(nullptr), size(0){}
|
||||
Set(const int* elements, int size) : elements(elements), size(size){}
|
||||
Set(const Set& copy) : size(copy.size){
|
||||
|
||||
}
|
||||
// Binary Operators
|
||||
// Set Operators
|
||||
Set operator+(const Set& val) const; // Union
|
||||
Set operator*(const Set& val) const; // Intersection
|
||||
Set operator-(const Set& val) const; // Difference
|
||||
// Compound Assignment Operators
|
||||
Set& operator+=(const Set& rhs); // Union Assignment
|
||||
Set& operator*=(const Set& rhs); // Intersection Assignment
|
||||
Set& operator-=(const Set& rhs); // Difference Assignment
|
||||
// Logical Operators
|
||||
bool operator==(const Set& val) const;
|
||||
bool operator!=(const Set& val) const;
|
||||
// Functional Operators
|
||||
Set& operator>(Set&); // Sort the elements in the set
|
||||
int& operator[](int element); // Access element at index
|
||||
bool operator()(int element) const; // Check if element is in the set
|
||||
bool operator()(int element, int dumy); // Add element to the set if it is not already in set, The dumy element to differenciate from the other operator
|
||||
bool operator()(int element, int dumy,int dumy2);// Add element to the set if it is not already in set and element is lcm between any to numbers of the set,
|
||||
// Two dumy elements to differenciate from the other operator
|
||||
// Additional Functions for functional operators
|
||||
int find(int element) const; // Find element in the set
|
||||
void display();
|
||||
~Set(); // destructor
|
||||
friend std::ostream& operator<<(std::ostream& output, const Set& val); // outputs the Set
|
||||
friend std::istream& operator>>(std::istream& input, Set& val); // inputs the Set
|
||||
};
|
40
.config/Code/User/History/1605affa/TKCL.cpp
Normal file
40
.config/Code/User/History/1605affa/TKCL.cpp
Normal file
|
@ -0,0 +1,40 @@
|
|||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
class Set{
|
||||
// You will need an array to store the elements of the set.
|
||||
// You will also need a variable to keep track of the size of the array.
|
||||
int* elements;
|
||||
int size;
|
||||
public:
|
||||
Set() : elements(nullptr), size(0){}
|
||||
Set(const int* elements, int size) : elements(elements), size(size){}
|
||||
Set(const Set& copy){
|
||||
|
||||
}
|
||||
// Binary Operators
|
||||
// Set Operators
|
||||
Set operator+(const Set& val) const; // Union
|
||||
Set operator*(const Set& val) const; // Intersection
|
||||
Set operator-(const Set& val) const; // Difference
|
||||
// Compound Assignment Operators
|
||||
Set& operator+=(const Set& rhs); // Union Assignment
|
||||
Set& operator*=(const Set& rhs); // Intersection Assignment
|
||||
Set& operator-=(const Set& rhs); // Difference Assignment
|
||||
// Logical Operators
|
||||
bool operator==(const Set& val) const;
|
||||
bool operator!=(const Set& val) const;
|
||||
// Functional Operators
|
||||
Set& operator>(Set&); // Sort the elements in the set
|
||||
int& operator[](int element); // Access element at index
|
||||
bool operator()(int element) const; // Check if element is in the set
|
||||
bool operator()(int element, int dumy); // Add element to the set if it is not already in set, The dumy element to differenciate from the other operator
|
||||
bool operator()(int element, int dumy,int dumy2);// Add element to the set if it is not already in set and element is lcm between any to numbers of the set,
|
||||
// Two dumy elements to differenciate from the other operator
|
||||
// Additional Functions for functional operators
|
||||
int find(int element) const; // Find element in the set
|
||||
void display();
|
||||
~Set(); // destructor
|
||||
friend std::ostream& operator<<(std::ostream& output, const Set& val); // outputs the Set
|
||||
friend std::istream& operator>>(std::istream& input, Set& val); // inputs the Set
|
||||
};
|
38
.config/Code/User/History/1605affa/ZdDH.cpp
Normal file
38
.config/Code/User/History/1605affa/ZdDH.cpp
Normal file
|
@ -0,0 +1,38 @@
|
|||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
class Set{
|
||||
// You will need an array to store the elements of the set.
|
||||
// You will also need a variable to keep track of the size of the array.
|
||||
int* elements;
|
||||
int size;
|
||||
public:
|
||||
Set();
|
||||
Set(const int* elements, int size);
|
||||
Set(const Set& copy); // copy constructor
|
||||
// Binary Operators
|
||||
// Set Operators
|
||||
Set operator+(const Set& val) const; // Union
|
||||
Set operator*(const Set& val) const; // Intersection
|
||||
Set operator-(const Set& val) const; // Difference
|
||||
// Compound Assignment Operators
|
||||
Set& operator+=(const Set& rhs); // Union Assignment
|
||||
Set& operator*=(const Set& rhs); // Intersection Assignment
|
||||
Set& operator-=(const Set& rhs); // Difference Assignment
|
||||
// Logical Operators
|
||||
bool operator==(const Set& val) const;
|
||||
bool operator!=(const Set& val) const;
|
||||
// Functional Operators
|
||||
Set& operator>(Set&); // Sort the elements in the set
|
||||
int& operator[](int element); // Access element at index
|
||||
bool operator()(int element) const; // Check if element is in the set
|
||||
bool operator()(int element, int dumy); // Add element to the set if it is not already in set, The dumy element to differenciate from the other operator
|
||||
bool operator()(int element, int dumy,int dumy2);// Add element to the set if it is not already in set and element is lcm between any to numbers of the set,
|
||||
// Two dumy elements to differenciate from the other operator
|
||||
// Additional Functions for functional operators
|
||||
int find(int element) const; // Find element in the set
|
||||
void display();
|
||||
~Set(); // destructor
|
||||
friend std::ostream& operator<<(std::ostream& output, const Set& val); // outputs the Set
|
||||
friend std::istream& operator>>(std::istream& input, Set& val); // inputs the Set
|
||||
};
|
41
.config/Code/User/History/1605affa/bVsb.cpp
Normal file
41
.config/Code/User/History/1605affa/bVsb.cpp
Normal file
|
@ -0,0 +1,41 @@
|
|||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
class Set{
|
||||
// You will need an array to store the elements of the set.
|
||||
// You will also need a variable to keep track of the size of the array.
|
||||
int* elements;
|
||||
int size;
|
||||
public:
|
||||
Set() : elements(nullptr), size(0){}
|
||||
Set(const int* elements, int size) : elements(elements), size(size){}
|
||||
Set(const Set& copy) : size(copy.size){
|
||||
elements = new int[size];
|
||||
for(int i=0;i<size;i++) elements[i] = copy.elements[i];
|
||||
}
|
||||
// Binary Operators
|
||||
// Set Operators
|
||||
Set operator+(const Set& val) const; // Union
|
||||
Set operator*(const Set& val) const; // Intersection
|
||||
Set operator-(const Set& val) const; // Difference
|
||||
// Compound Assignment Operators
|
||||
Set& operator+=(const Set& rhs); // Union Assignment
|
||||
Set& operator*=(const Set& rhs); // Intersection Assignment
|
||||
Set& operator-=(const Set& rhs); // Difference Assignment
|
||||
// Logical Operators
|
||||
bool operator==(const Set& val) const;
|
||||
bool operator!=(const Set& val) const;
|
||||
// Functional Operators
|
||||
Set& operator>(Set&); // Sort the elements in the set
|
||||
int& operator[](int element); // Access element at index
|
||||
bool operator()(int element) const; // Check if element is in the set
|
||||
bool operator()(int element, int dumy); // Add element to the set if it is not already in set, The dumy element to differenciate from the other operator
|
||||
bool operator()(int element, int dumy,int dumy2);// Add element to the set if it is not already in set and element is lcm between any to numbers of the set,
|
||||
// Two dumy elements to differenciate from the other operator
|
||||
// Additional Functions for functional operators
|
||||
int find(int element) const; // Find element in the set
|
||||
void display();
|
||||
~Set(); // destructor
|
||||
friend std::ostream& operator<<(std::ostream& output, const Set& val); // outputs the Set
|
||||
friend std::istream& operator>>(std::istream& input, Set& val); // inputs the Set
|
||||
};
|
1
.config/Code/User/History/1605affa/entries.json
Normal file
1
.config/Code/User/History/1605affa/entries.json
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":1,"resource":"file:///home/rafayahmad/Stuff/OOP%20Assignment%2004/Q4.cpp","entries":[{"id":"ZdDH.cpp","timestamp":1713499885975},{"id":"mwXa.cpp","timestamp":1713499902678},{"id":"H7Rw.cpp","timestamp":1713499940025},{"id":"TKCL.cpp","timestamp":1713499977132},{"id":"Mwlx.cpp","timestamp":1713500000902},{"id":"bVsb.cpp","timestamp":1713500044809},{"id":"Ks4u.cpp","timestamp":1713500081303},{"id":"7zmm.cpp","timestamp":1713500092636},{"id":"Lx3v.cpp","timestamp":1713500114463},{"id":"nYZt.cpp","timestamp":1713500179276},{"id":"9HSH.cpp","timestamp":1713500189770}]}
|
38
.config/Code/User/History/1605affa/mwXa.cpp
Normal file
38
.config/Code/User/History/1605affa/mwXa.cpp
Normal file
|
@ -0,0 +1,38 @@
|
|||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
class Set{
|
||||
// You will need an array to store the elements of the set.
|
||||
// You will also need a variable to keep track of the size of the array.
|
||||
int* elements;
|
||||
int size;
|
||||
public:
|
||||
Set();
|
||||
Set(const int* elements, int size);
|
||||
Set(const Set& copy); // copy constructor
|
||||
// Binary Operators
|
||||
// Set Operators
|
||||
Set operator+(const Set& val) const; // Union
|
||||
Set operator*(const Set& val) const; // Intersection
|
||||
Set operator-(const Set& val) const; // Difference
|
||||
// Compound Assignment Operators
|
||||
Set& operator+=(const Set& rhs); // Union Assignment
|
||||
Set& operator*=(const Set& rhs); // Intersection Assignment
|
||||
Set& operator-=(const Set& rhs); // Difference Assignment
|
||||
// Logical Operators
|
||||
bool operator==(const Set& val) const;
|
||||
bool operator!=(const Set& val) const;
|
||||
// Functional Operators
|
||||
Set& operator>(Set&); // Sort the elements in the set
|
||||
int& operator[](int element); // Access element at index
|
||||
bool operator()(int element) const; // Check if element is in the set
|
||||
bool operator()(int element, int dumy); // Add element to the set if it is not already in set, The dumy element to differenciate from the other operator
|
||||
bool operator()(int element, int dumy,int dumy2);// Add element to the set if it is not already in set and element is lcm between any to numbers of the set,
|
||||
// Two dumy elements to differenciate from the other operator
|
||||
// Additional Functions for functional operators
|
||||
int find(int element) const; // Find element in the set
|
||||
void display();
|
||||
~Set(); // destructor
|
||||
friend std::ostream& operator<<(std::ostream& output, const Set& val); // outputs the Set
|
||||
friend std::istream& operator>>(std::istream& input, Set& val); // inputs the Set
|
||||
};
|
44
.config/Code/User/History/1605affa/nYZt.cpp
Normal file
44
.config/Code/User/History/1605affa/nYZt.cpp
Normal file
|
@ -0,0 +1,44 @@
|
|||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
class Set{
|
||||
// You will need an array to store the elements of the set.
|
||||
// You will also need a variable to keep track of the size of the array.
|
||||
int* elements;
|
||||
int size;
|
||||
public:
|
||||
Set() : elements(nullptr), size(0){}
|
||||
Set(const int* elements, int size) : size(size){
|
||||
elements = new int[size];
|
||||
for(int i=0;i<size;i++) elements[i] = copy.elements[i];
|
||||
}
|
||||
Set(const Set& copy) : size(copy.size){
|
||||
elements = new int[size];
|
||||
for(int i=0;i<size;i++) elements[i] = copy.elements[i];
|
||||
}
|
||||
// Binary Operators
|
||||
// Set Operators
|
||||
Set operator+(const Set& val) const; // Union
|
||||
Set operator*(const Set& val) const; // Intersection
|
||||
Set operator-(const Set& val) const; // Difference
|
||||
// Compound Assignment Operators
|
||||
Set& operator+=(const Set& rhs); // Union Assignment
|
||||
Set& operator*=(const Set& rhs); // Intersection Assignment
|
||||
Set& operator-=(const Set& rhs); // Difference Assignment
|
||||
// Logical Operators
|
||||
bool operator==(const Set& val) const;
|
||||
bool operator!=(const Set& val) const;
|
||||
// Functional Operators
|
||||
Set& operator>(Set&); // Sort the elements in the set
|
||||
int& operator[](int element); // Access element at index
|
||||
bool operator()(int element) const; // Check if element is in the set
|
||||
bool operator()(int element, int dumy); // Add element to the set if it is not already in set, The dumy element to differenciate from the other operator
|
||||
bool operator()(int element, int dumy,int dumy2);// Add element to the set if it is not already in set and element is lcm between any to numbers of the set,
|
||||
// Two dumy elements to differenciate from the other operator
|
||||
// Additional Functions for functional operators
|
||||
int find(int element) const; // Find element in the set
|
||||
void display();
|
||||
~Set(); // destructor
|
||||
friend std::ostream& operator<<(std::ostream& output, const Set& val); // outputs the Set
|
||||
friend std::istream& operator>>(std::istream& input, Set& val); // inputs the Set
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue