Question: Use C++ and Visual Studio run Mathematically, a set is said to be consists of well-defined elements. Elements can be numbers (0,1,2,3,4,5,6,7,8,9 or letters A
Use C++ and Visual Studio run
Mathematically, a set is said to be consists of well-defined elements. Elements can be numbers (0,1,2,3,4,5,6,7,8,9 or letters A to Z).
For instance, the following are well-defined sets.
A = {1, 2, 3, A, 5, 6, 7, G} and B = {2, 3, 4, 8, 9, B}
A set may be described using other types of expression; specially, if the set has elements (members) that are numerous to list. There is some well-defined operation that can be performed on sets.
The class should be called COSCOperation
1. Determining a given set A is a subset of B, or not and set B is a subset of A, or not. (This should be a function called getSubset) CREATE YOUR FUNCTION.
A is-a-subset-of B ==> false B is-a-subset-of A ==> false
2. Union of sets: finds all elements of both A and B and generates a unique set and sorted. (This should be a function called getUnion) CREATE YOUR FUNCTION.
A union B = {1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, G}
3. Intersection of sets: determines common elements that belong to both A and B. (This should be a function called getIntersection) CREATE YOUR FUNCTION.
A intersection-of B = {2, 3, 4}
4. Complement of sets: given the following sets (This should be a function called getComplement) CREATE YOUR FUNCTION.
A = {1, 2, 3, 4} and B = {5, 2, 3, 8} A - B = {1, 4} or B - A = {5, 8}
Tasks Requirement
+---------------------------+
1. You are to develop a "Set Operation Calculator" using C++ Object Oriented Programming. The cpp file should be name Operation_LastNameFirstName.cpp
2. Expressions are read from file call input.dat
a. Create a file with 2 line the first line is input for A and the second line should be the input for B (They don't have to be the same length but they can).

this is my code:
// Operation_LastNameFirstName.cpp
#include
using namespace std;
void getInputFromFile(); //Only function that can be change
class COSCOperation
{
private:
string input_A;
string input_B;
public :
bool getSubset(string A_input, string B_input)
{
bool isSubset = true;
return isSubset;
}
string getUnion() {
string results = "";
return results;
}
string getIntersection() {
string results = "";
return results;
}
string getComplement() {
string results = "";
return results;
}
};
int main()
{
COSCOperation obj;
system("pause");
return 0;
}
void getInputFromFile() {}
Sample input below Sample A- 1,2,3,4,FZ 5,2,3,8,Z Sample B . Sample C . 1,2,Y,3,4 1A,5 A,D,F A,B,3,C,F 3. The solutions are displayed on the display screen and out to a file called output_LastNameFirstName.dat. You must create 4 functions for each of the operations. OutPut: - 4. . Given these sets: A (1, 2, 3, 4, F, Z) and B = {5, 2, 3, 8, Z) A is-a-subset-ofB > false B is-a-subset-of A ==> false A-B (1, 4, F Sample input below Sample A- 1,2,3,4,FZ 5,2,3,8,Z Sample B . Sample C . 1,2,Y,3,4 1A,5 A,D,F A,B,3,C,F 3. The solutions are displayed on the display screen and out to a file called output_LastNameFirstName.dat. You must create 4 functions for each of the operations. OutPut: - 4. . Given these sets: A (1, 2, 3, 4, F, Z) and B = {5, 2, 3, 8, Z) A is-a-subset-ofB > false B is-a-subset-of A ==> false A-B (1, 4, F
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
