Re: Can anyone help me on C++ question. tq
From: Richard Harter (cri_at_tiac.net)
Date: 04/13/04
- Next message: Ben Pfaff: "Re: nutrition algorithm"
- Previous message: Noah Roberts: "Re: college"
- In reply to: Will Twentyman: "Re: Can anyone help me on C++ question. tq"
- Next in thread: Will Twentyman: "Re: Can anyone help me on C++ question. tq"
- Reply: Will Twentyman: "Re: Can anyone help me on C++ question. tq"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 13 Apr 2004 19:43:31 GMT
On Tue, 13 Apr 2004 12:25:34 -0400, Will Twentyman
<wtwentyman@read.my.sig> wrote:
>tmnet wrote:
>
>> Dear all,
>> Below is the question :
>>
>> Array manipulations, Class, Exception handling, Generic class.
>>
>> - design, implement and test a set class in c++ that provides the
>> operations; set membership, set intersection, set union and set diferrence.
>> An array is to be used to represent a set within a class.
>>
>> hope you all can help. thank you.
>>
>
>I'll be nice and assume you don't understand what a set is, rather than
>wanting us to do your homework for you.
>
>A set is a list without repetition, an array is a list.
>Union merges sets, might be thought of as +.
>Intersection uses only common elements, might be thought of as *.
>Difference removes elements of the second set from the first, might be
>thought of as -.
>
>Examples:
>
>A = {1,2,3,4}
>B = {1,3,5,7}
>
>A+B = {1,2,3,4,5,7}
>A*B = {1,3}
>A-B = {2,4}
As a minor bit of pedantry on an otherwise excellent post, a set is
not, I repeat NOT, a list with or without repetition, even though one
can represent a set with a list.
Richard Harter, cri@tiac.net
http://home.tiac.net/~cri, http://www.varinoma.com
A university is what a college becomes when the faculty
loses interest in students. - John Ciardi
- Next message: Ben Pfaff: "Re: nutrition algorithm"
- Previous message: Noah Roberts: "Re: college"
- In reply to: Will Twentyman: "Re: Can anyone help me on C++ question. tq"
- Next in thread: Will Twentyman: "Re: Can anyone help me on C++ question. tq"
- Reply: Will Twentyman: "Re: Can anyone help me on C++ question. tq"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|