Okay, I am working on a C++ project but I need some help. Here are my instructions:
//////////////////
Write a class called Individual.
The class contains a Boolean array (const int size = 10) internally (private)
whose values are randomly generated inside constructor. (Hint: use
member initializer to assign 10 to const int size)
The class has a function, called and, which takes in another individual
object and return this object (hint: *this) whose Boolean array contains the
result of AND from two Boolean array. If two objects have different array
sizes, compute and using the smaller size. For example:
Individual object1 has 1001010110 in its internal array.
Individual object2 has 0001011011 in its internal array.
After executing the following statement:
object1.AND(object2);
The internal array of object1 becomes 0001010010.
object2’s array remains unchanged.
//////////////
I am not sure how to give objects arrays or how to setup the And function. Here is my coding so far: