Question: As you probably know primitive arrays are efficient but do have some limitations . For instance, there is no way to guard against someone trying
As you probably know primitive arrays are efficient but do have some limitations For instance, there is no way to guard against someone trying to access elements that do not exist. It is on the programmer to make sure this doesn't happen. In this assignment you are going to create a class called CheckedArray which will fix some of these limitations
C Your CheckedArray class should contain a pointer to an int called mArray in the private section and an int variable called mSize which will hold the size of the array once it has been created.
Java Your CheckedArray class should contain a private Reference to an Integer array called mArray and an Integer variable called mSize which will hold the size of the array once it has been created.
Checked Array Functionality
Your CheckedArray class should have the following functionality
Initialize
C bool initilizeint size, int val
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
