Question: LANGUAGE OF CHOICE: C++ Write a program with a language of your choice takes two sets as input and outputs the intersection, union, difference, and
LANGUAGE OF CHOICE: C++
Write a program with a language of your choice takes two sets as input and outputs the intersection, union, difference, and Cartesian product of the two sets. NOTE 1/ Your program must have functions for each operation. 2/ Please submit the complete program to Beachboard under Lab 2 by 02/15/2018 at the beginning of class. 3/ You will demo vour program during the lab. 4/ Here is a sample run: Set A: 11, 2, 3, 41 Set B: 12, 3, 4, 5} The intersection of A and B: 12, 3, 4 The union of A and B: 11, 2, 3, 4, 5]} The difference of A and B: 11} The Cartesian product of A and B: ((1, 2), (1, 3), (1, 4), (1, 5), (2, 5/ Here is another sample run: Set A: {1) Set B: 12, 3, 4, 5} The intersection of A and B: t h The union of A and B: 11, 2, 3, 4, 5} The difference of A and B: 11} The Cartesian product of A and B: ((1, 2), (1, 3), (1, 4), (1, 5)>
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
