///////
//
// Student: Russell Lowke
//     T.F: Francis Crick
// Unit Six, pencil-and-paper - question 3 [worth 2pts],  7/23/2002
//
//
// cats(16), fliers(16), insects(16), mammals(16), carnivores(16)
//
// Using the overload operators +, *, and - of class bitset, construct from the
// the above set vars expressions for:

a) the carnivorous mammals

bitset carnivorousMammals(16);
carnivorousMammals = mammals * carnivorous;


b) the animals that are cats or that can fly

bitset catsOrFliers(16);
catsOrFliers = cats + fliers;


c) the flying animals that are not insects

bitset nonInsectFliers(16);
nonInsectFliers = fliers - insects;


// construct boolean expressions that determine whether:

a) an animal whose code is a is a mammal

( mammal.member(a) )


b) an animal whose code is a is a mammal but not a cat

( mammal.member(a) && ! cats.member(a) )


c) all mammals that cannot fly are cats

( cats == mammals - fliers )