Question: This is the program to correct: There are no files for the boolMatrix class (boolMatrix.h and boolMatrix.cpp). Could you please fix this? #include #include using
This is the program to correct: There are no files for the boolMatrix class (boolMatrix.h and boolMatrix.cpp). Could you please fix this?
#include
#include
using namespace std;
class boolMatrix
{
bool a[20][20];
public:
static const int NUM_ROWS = 20;
static const int NUM_COLS = 20;
boolMatrix()
{int i,j;
for(i=0;i<20;i++)
for(j=0;j<20;j++)
a[i][j]=false;
}
void get(int,int);
void set(int,int,bool);
int rowCount(int);
int colCount(int);
int totalCount();
int neighborCount(int,int);
};
void boolMatrix::get(int i, int j)
{ assert(i >= 0 && i < NUM_ROWS);
assert(j >= 0 && j< NUM_COLS);
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
