posted 8 years ago
I am attempting to implement an interface named Matrix and then perform various functions on the new Matrix objects. I cannot seemed to get passed go for this (college) assignment. When I initiate a new Matrix object and pass in a 2D array, I lose the ability to access any of the indexes in the array. I know it cannot be this difficult to implement. I haven't really accomplished anything because I cannot get go far without the ability to access the elements in the arrays. Can anyone explain how to avoid this? I can find many implementations of interfaces but can't find any that convert an array to an object and then modify the contents. I have attached the interface, as well as my (lack) of code. I have essentially been stuck between lines 2-9 because without the ability to access elements, there is no point in writing anything further. Any help would be great.