Re: Can anyone help me on C++ question. tq
From: Will Twentyman (wtwentyman_at_read.my.sig)
Date: 04/13/04
- Next message: CBFalconer: "Re: GUI vs: CLI"
- Previous message: William: "Re: A very quick, informal survey"
- In reply to: tmnet: "Can anyone help me on C++ question. tq"
- Next in thread: Richard Harter: "Re: Can anyone help me on C++ question. tq"
- Reply: Richard Harter: "Re: Can anyone help me on C++ question. tq"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 13 Apr 2004 12:25:34 -0400
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}
-- Will Twentyman email: wtwentyman at copper dot net
- Next message: CBFalconer: "Re: GUI vs: CLI"
- Previous message: William: "Re: A very quick, informal survey"
- In reply to: tmnet: "Can anyone help me on C++ question. tq"
- Next in thread: Richard Harter: "Re: Can anyone help me on C++ question. tq"
- Reply: Richard Harter: "Re: Can anyone help me on C++ question. tq"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|