
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Project; Class: CS I PROG/PROBLEM SOLVING; Subject: Computer Science; University: Kent State University; Term: Fall 2008;
Typology: Study Guides, Projects, Research
1 / 1
This page cannot be seen from the preview
Don't miss anything!

In this project you are to provide the implementation and usage for a Set class. I have provided a header file, set.h, which contains the definition of this class. You need to provide the implementation of the member functions declared in this class definition. Place your implementation in set.cpp. You can add other methods and attributes to the class definition if necessary. You also need to develop a program that uses the class. Place this program in a file named useset.cpp. The program should ask the user to input the members of the first set, then the members of the second set, then the operation to be carried out and then print the results and exit. You can assume that the set members are natural numbers (positive integers). There are no more than MAX_SETSIZE (this is a constant defined in set.h) members in the set. Input zero signifies the end of the set. Zero itself is not part of the set. The user may input the same number multiple times. However, set members should be all distinct, so do include duplicate numbers in a set. You do not have to either keep the set members sorted or output them in order. An example dialogue is as follows. User input is in bold input set A: 2 3 4 5 6 25 4 4 0 input set B: 55 6 4 44 2 4 0 available operations