lab08 - Lab 8 Source File: Input: Output: Value:

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Lab 8 Due Date: Friday, September 16, 2011 Source File: ~/2305/lab08.(C|CPP|cpp|c++|cc|cxx|cp) Input: Under control of main function Output: Under control of main function Value: 2 The purpose of this assignment is to become more familiar with the process of providing overloaded operators for a class. The IntegerSet class from Labs 04 and 06 will be modi±ed to provide: an overloaded ouput operator for displaying an IntegerSet , overloaded operators for adding an element to an IntegerSet and deleting an element from an Inte- gerSet , an overloaded operator to compute the complement of an IntegerSet , and an overloaded assignment operator for assigning one IntegerSet to another (this is necessary since the private data includes an array), A header ±le is shown in Figure 1, a sample main function for testing your implementation is shown in Figure 2, a sample data ±le is shown in Figure 3, and a sample execution sequence is shown in Figure 4. To use the Makefile as distributed in class, add a target of lab08 to targets2srcfileswithlibrary . 1 #ifndef LAB08_H 2 #define LAB08_H 3 4 #include <iostream> 5 #include <bits.h> 6 7 using namespace std; 8 9 const uint N = 48; 10 11 class IntegerSet 12 { 13 // overloaded output operator for printing IntegerSet set to 14 // output stream out 15 friend ostream& operator 16 public: 17 IntegerSet(); // initializes the set to the empty 18 // set 19 IntegerSet(const IntegerSet& otherSet); // copy constructor 20 ~IntegerSet();
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/13/2011 for the course CS 2305 taught by Professor Motl,m during the Fall '08 term at Angelo State.

Page1 / 4

lab08 - Lab 8 Source File: Input: Output: Value:

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online