Here is the sample output of the program. The Bold and Underlined text denotes for user input. Enter number of elements for set A (max 10): 8 ALe] = 2 A[1] = 7 A[2] - 3 AL3] AL4] = 1 ALs] - 5 A[6] - 6 AL7] = 4 = 10 Enter number of elements for setB (max 10): 6 B[e] = 10 B[1] 8 B[2] = Z B[3] = 6 B[4] = 5 BIS] = 2 Output As(1, 3, 4, 5, 6, 7, 9, 10) Ba(2, 5, 6, 7, 8, 1e) AUB=(1,2,3,4,5,6,7,8,9,10} AnBa(5,6,10)

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
Please help c++language
Here is the sample output of the program. The Bold and Underlined text denotes for a
user input.
Enter number of elements for set A (max 10): 8
A[e] = 9
A[1] = 7
A[2] = 3
A[3] = 10
A[4] = 1
AL5] = 5
A[6] = 6
AL7] = 4
Enter number of elements for set B (max 10): 6
B[e] = 10
B[1] = 8
B[2] = Z
B[3] = 6
B[4] = 5
BIS] = 2
Output
As(1, 3, 4, 5, 6, 7, 9, 10}
Ba{2, 5, 6, 7, 8, 10}
AUB={1,2,3,4,5,6,7,8,9,10}
AnBs(5,6,10}
Transcribed Image Text:Here is the sample output of the program. The Bold and Underlined text denotes for a user input. Enter number of elements for set A (max 10): 8 A[e] = 9 A[1] = 7 A[2] = 3 A[3] = 10 A[4] = 1 AL5] = 5 A[6] = 6 AL7] = 4 Enter number of elements for set B (max 10): 6 B[e] = 10 B[1] = 8 B[2] = Z B[3] = 6 B[4] = 5 BIS] = 2 Output As(1, 3, 4, 5, 6, 7, 9, 10} Ba{2, 5, 6, 7, 8, 10} AUB={1,2,3,4,5,6,7,8,9,10} AnBs(5,6,10}
1. Union and Intersection of Two Sets
B
3
1
7
9
4
6
2
7
Venn diagram
A={1, 3, 4, 5, 6, 7,9, 10}
B={2, 5, 6, 7, 8, 10}
AUB={1,2,3,4,5,6,7,8,9,10}
ANB={5,6,10}
Create a program Dev C++ that will perform the union and intersection of two input
sets of integer numbers. Use one-dimensional array to represent your set. Your program
must have the following operations in linear lists:
Storing new element in an array
Sorting the elements of an array
Merging two sets
Retrieving elements in an array
Present your solution in a class structure. When printing the elements of an array, make
no sure that there is no duplicate value. Use the following variables in your solution:
N with constant value 10 for maximum size of array
A[N] and B[N] represents the two sets
AUB[N*2] holds the elements for union of A and B
AnB[N] holds the elements for intersection of A and B
Transcribed Image Text:1. Union and Intersection of Two Sets B 3 1 7 9 4 6 2 7 Venn diagram A={1, 3, 4, 5, 6, 7,9, 10} B={2, 5, 6, 7, 8, 10} AUB={1,2,3,4,5,6,7,8,9,10} ANB={5,6,10} Create a program Dev C++ that will perform the union and intersection of two input sets of integer numbers. Use one-dimensional array to represent your set. Your program must have the following operations in linear lists: Storing new element in an array Sorting the elements of an array Merging two sets Retrieving elements in an array Present your solution in a class structure. When printing the elements of an array, make no sure that there is no duplicate value. Use the following variables in your solution: N with constant value 10 for maximum size of array A[N] and B[N] represents the two sets AUB[N*2] holds the elements for union of A and B AnB[N] holds the elements for intersection of A and B
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education