Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Lab 11 Due Date: See Blackboard IntegerSet operator+(const IntegerSet& rhs) const; I/ union IntegerSet operator (const IntegerSet& rhs) const; // intersection ItegerSet operator-(const IntegerSet& rhs)

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

image text in transcribed

Lab 11 Due Date: See Blackboard IntegerSet operator+(const IntegerSet& rhs) const; I/ union IntegerSet operator (const IntegerSet& rhs) const; // intersection ItegerSet operator-(const IntegerSet& rhs) const; // difference IntegerSet operator/(const IntegerSet& rhs) const; // aymmetric diff bool operator--(const IntegerSet& rha) const; // Test for equality 7bool operator (const IntegerSet& rhs) const; II Subset bool operator (const IntegerSet& rha) conat; /I Proper Subset o private: uint .bitVector; // Pointer to dynamically // allocated memory bool isValid(uint e) const; uint word(uint n) const; // Determine index within // bitVector where n is located // Determine position within I bitVectorword (n)] /I for element n // Calculate # of element8 // in bitVector to represent uint bit(uint n) const; void allocateStorageO elements 0 (N-1) &then // allocate storage #endif Figure 1. /uar/local/2336/include/lab11.h (Part 2 of 2) Lab 11 Due Date: See Blackboard #include 2 #include 4using namespace std; s int main) uinte, j, n; IntegerSet s, t, c, u, i, d; while (cin >> ) for j-0; j> e; 8.8+e; cout > n; cin >> e; cout /getlab.ksh 11 aChecking to see if a folder exists for Lab 11 4Creating a folder for Lab 11 Checking to see if Lab 11 has sample input and output files Copying input and output files for Lab 11 Yes from folder usr/local/2336/data/11 to folder/11 Checking to see if /usr/local/2336/src/lab11main.C exists Copying file /usr/local/2336/src/lab11main.C to folder /11 oChecking to see if /usr/local/2336/include/lab11.h exists Yes Copying file /usr/local/2336/include/lab11.h to folder /11 Copying file /usr/local/2336/src/Makefile to folder-/11 Adding a target of lab11 to targets2srcfilesvithlibrary Touching file ./11/lab11.cpp Edit file -/11/1ab11.cpp in Notepad s nevuser@csunix /2336> cd 11 17 nevusercsunix-/2336/11> ls s 01.dat 01.out Makefile lab11.cpp lab11.h lab11main.C nevuser@csunix /2336/11> make lab11 a * -g -Wall-std-c11 lab11main.c -I/usr/local/2336/include I *-g -Wall -std-c11 -lab11.epp -I/usr/local/2336/include I go lab11 lab11main.o lab11.o L/usr/local/2336/1ib 23-W1.-whole-archive-1lab11-1,-no-uhole-archive1nlbits 2 evuser@csunix /2336/11> cat 01.dat 1 2 3 4 27 3 1 45 1 2 4 8 16 32 a 10 3 6 9 12 15 3 6 9 12 15 13 34 4 8 12 16 20 24 28 32 36 40 44 48 52 35 48 0 1 2 3 45 67 8 9 7 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 40 41 42 43 44 45 46 47 0 Figure 3. Commands to Compile, Link, &Run Lab 11 (Part 1 of 2) /2336/11 cat 01.dat ./lab11 41,2,3.4) 45 s.cardinality)- 4 t1.4,5) 47 t.cardinality)3 S-t-false 49s cat 01.dat ./labl 1 > my.out newuserocsuni /2336/11> diff 01.out ny.out T4 newuserdcsuni /2336/11> Figure 3. Commands to Compile, Link, &Run Lab 11 (Part 2 of 2) #include bool operator(const IntegerSet&rhs) const//Test for equality bool operator 2 #include 4using namespace std; s int main) uinte, j, n; IntegerSet s, t, c, u, i, d; while (cin >> ) for j-0; j> e; 8.8+e; cout > n; cin >> e; cout /getlab.ksh 11 aChecking to see if a folder exists for Lab 11 4Creating a folder for Lab 11 Checking to see if Lab 11 has sample input and output files Copying input and output files for Lab 11 Yes from folder usr/local/2336/data/11 to folder/11 Checking to see if /usr/local/2336/src/lab11main.C exists Copying file /usr/local/2336/src/lab11main.C to folder /11 oChecking to see if /usr/local/2336/include/lab11.h exists Yes Copying file /usr/local/2336/include/lab11.h to folder /11 Copying file /usr/local/2336/src/Makefile to folder-/11 Adding a target of lab11 to targets2srcfilesvithlibrary Touching file ./11/lab11.cpp Edit file -/11/1ab11.cpp in Notepad s nevuser@csunix /2336> cd 11 17 nevusercsunix-/2336/11> ls s 01.dat 01.out Makefile lab11.cpp lab11.h lab11main.C nevuser@csunix /2336/11> make lab11 a * -g -Wall-std-c11 lab11main.c -I/usr/local/2336/include I *-g -Wall -std-c11 -lab11.epp -I/usr/local/2336/include I go lab11 lab11main.o lab11.o L/usr/local/2336/1ib 23-W1.-whole-archive-1lab11-1,-no-uhole-archive1nlbits 2 evuser@csunix /2336/11> cat 01.dat 1 2 3 4 27 3 1 45 1 2 4 8 16 32 a 10 3 6 9 12 15 3 6 9 12 15 13 34 4 8 12 16 20 24 28 32 36 40 44 48 52 35 48 0 1 2 3 45 67 8 9 7 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 40 41 42 43 44 45 46 47 0 Figure 3. Commands to Compile, Link, &Run Lab 11 (Part 1 of 2) /2336/11 cat 01.dat ./lab11 41,2,3.4) 45 s.cardinality)- 4 t1.4,5) 47 t.cardinality)3 S-t-false 49s cat 01.dat ./labl 1 > my.out newuserocsuni /2336/11> diff 01.out ny.out T4 newuserdcsuni /2336/11> Figure 3. Commands to Compile, Link, &Run Lab 11 (Part 2 of 2) #include bool operator(const IntegerSet&rhs) const//Test for equality bool operator<><>

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

Handbook Of Relational Database Design

Authors: Candace C. Fleming, Barbara Von Halle

1st Edition

0201114348, 978-0201114348

More Books

Students also viewed these Databases questions

Question

The company has fair promotion/advancement policies.

Answered: 1 week ago