Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In C + + Write a program that uses the singly linked list object covered in class to implement the ordered sets data structure for

In C++ Write a program that uses the singly linked list object covered in class to implement the ordered sets data structure for values between 25 and 35. I have provided you with resource material (mathsisfun.com) to illustrate set theory. Each line corresponds to the sets you are to create. The additional member function that you will implement are listed below. Implement fault tolerance (error handling) as you write you program.
Note: To prove that any member function works, you must print the set prior to and after the actions of the subprogram. New sets must be printed to show that they have been created.
Create a set called S, M, N, A, B, C, D, P1, P2, R. Fill them with values from the file
Print the contents of each set
Search a set for the values 40,29, and 48 in set R. Print the ith node where the value was found and a message indicating the number is not in the list.
Find the number of elements in a given set, S
Destroy set R
Determine whether sets M and N are equal
Find the intersection of sets A and B. Name the intersection set intersect
Find the union of sets C and D. Name the union set uni
Find the maximum value in set uni. The maximum value is returned.
Add the value 79 to set D
Remove the first element from the set M
Remove the last element from the set B
Find the relative difference between set A and S. Name the difference set diff
Find the cross product of two set P1 and P2. They must have the same number of elements (be of the same order). Name the cross-product set CP

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Analysis In Microsoft Excel

Authors: Alex Holloway

1st Edition

B0CCCPKTTX, 979-8852388452

More Books

Students also viewed these Databases questions

Question

Evaluate 3x - x for x = -2 Answer:

Answered: 1 week ago

Question

What is group replacement? Explain with an example. (2-3 lines)

Answered: 1 week ago