Homework 3A, A 2D Array Class.

Short Description:

Implement a 2D array class.

Goals

When you finish this homework, you should have:

Formal Description

Implement a static 2D array class. This should be called Array2T. It should hold up to 100 x 100 elements, of type DataT, which you will alias in your header file to be an integer type.

This class should be implemented in Array2T.h and Array2T.cpp. You should also supply a test driver (testDrive.cpp) that will test all methods completely.

You should support the following methods

Both at and [] should take two size_t parameters, rows and columns. To do this, you will need to use at least c++23. For the at operator, if the array indexes are out of bounds, print an appropriate error message and return position (0,0). You should support the following code snippet:
Array2T a;

cout << a[10,20];
cout << a.at(10,20);
a[1,2] = 5
a.at(1,2) = 5

Since we do not have dynamic array yet, you will need to declare a static array, and keep track of:

This WILL change in the future.

Notes

We will be containing to work on this for the next few assignments.

Your code must compile without warnings or errors on prog1 with the following flags: -Wall -Wextra -Wpedantic -Wshadow -Wconversion -std=c++23 -g -O2

Required Files

Please submit all files required to build your class, along with a program to test your class and a Makefile to the D2L folder as a tar or zip file.

Submission

Submit the assignment to the D2L folder Homework 3A by the due date.